I'm new to Asp.net and I'm currently working with GridViews. I've looked around this site and others and have seen tips for how to add sorting arrows to column headers.
So far I've got arrows to show on a sorted column by doing this:
Set these GridView properties:
SortedAscendingHeaderStyle-CssClass="sortasc"
SortedDescendingHeaderStyle-CssClass="sortdesc"
And my css has this:
th.sortasc a
{
display:block; padding:0 4px 0 15px;
background:url("images/icons/ascArrow.png") no-repeat;
}
th.sortdesc a
{
display:block; padding:0 4px 0 15px;
background:url("images/icons/descArrow.png") no-repeat;
}
This works great to show an image after the user clicks a header and the column sorts.
The issue I'm having now, is that I'd like all columns to show images by default before they're sorted so that users can know that they can click them to sort. Is there a way to accomplish this?
So far I've got arrows to show on a sorted column by doing this:
Set these GridView properties:
SortedAscendingHeaderStyle-CssClass="sortasc"
SortedDescendingHeaderStyle-CssClass="sortdesc"
And my css has this:
th.sortasc a
{
display:block; padding:0 4px 0 15px;
background:url("images/icons/ascArrow.png") no-repeat;
}
th.sortdesc a
{
display:block; padding:0 4px 0 15px;
background:url("images/icons/descArrow.png") no-repeat;
}
This works great to show an image after the user clicks a header and the column sorts.
The issue I'm having now, is that I'd like all columns to show images by default before they're sorted so that users can know that they can click them to sort. Is there a way to accomplish this?