Hi,
In my gridview which has four BondFields. Each field has a css class colA, colB, colC, colD respectively.
<ItemStyle CssClass="colA" />
<HeaderStyle CssClass="colA" />
the problem is these cssClass are skiped. I looked over the adapater source code, in the writeRows method where it loops through the cells, I try to check if the cell already has a css class, if so, write it out, if not, skip it.
foreach (TableCell cell in row.Cells)
{
writer.WriteLine();
if (cell.CssClass!= null)
{
cell.Attributes.Add("class", cell.CssClass);
}
cell.RenderControl(writer);
}
but it's not working. It simply adds an empty "class=''" to each <td>, my specified "colA, colB....etc" are not rendered. what am I doing wrong?
Also, in case other finds this helpful, I specified a cssClass to my gridView, but the adapter skips it as well, so find where the adapter renders the "summary" attribute and after it, do....
writer.WriteAttribute("summary", Control.ToolTip);
if (gridView.CssClass != null)
{
writer.WriteAttribute("class", gridView.CssClass);
}
Thanks.
Liming Xu
Jumptree ASP.NET 2.0 Project Management - For the Open Source Community and Effectively Manage Projects/Tasks/Milestones