i need your help give css property into gridview in the header of columns' Css. Up or Down image?
string AscCSS = "sortascheader";
string DescCSS = "sortdescheader";
foreach (DataControlField field in gvProducts.Columns)
{
for (int i = 0; i < gvProducts.Columns.Count; i++)
{
if (field.SortExpression == gvProducts.Columns[i].SortExpression)
{
if (gvProducts.SortDirection == SortDirection.Ascending)
field.HeaderStyle.CssClass = DescCSS;
else
field.HeaderStyle.CssClass = AscCSS;
}
}
}
i have this property in gridview generated("GridView Row DataBound EVENT"). Sorting is ok but Css propert not working. Such as. Up not converting to down icon?????