Link to home
Start Free TrialLog in
Avatar of mitztraykray
mitztraykray

asked on

Sorting information in the Gridview (ASP.NET 2.0)

When a user clicks a column name on my gridview it automatically sorts all of the information by that column name.  It works great, but I want an image of an arrow pointing up or down based on if the search is ascending or descending.  I have two images: asc.gif, des.gif - how can I get the proper one to the right of the column name based on the column which was sorted?

Thank you,

Lee
ASKER CERTIFIED SOLUTION
Avatar of valkyrie_nc
valkyrie_nc
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mitztraykray
mitztraykray

ASKER

valkyrie -

What method would I put this in?  The DataBound event, so it only fires once when the grid is loaded?

Thank you,

Lee
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks guys - I now have enough to go in the right direction. :)

Lee
I liked this question, so I started trying to put together some code of my own that looped through the Columns collection and matched the Column with the SortExpression... and then I decided... this is no fun, someone else must have done this before... and sure enough... it appears someone has... ;)

-- Jason