1

I need to add an expandable feature to my gridview and I am not quite sure if the tutorials I am finding online quite cover what I'm looking for. We have a gridview that is populated with the results of a SQL query. These results are sorted by "expiration date," with all expired records moved to the top and greyed out. We want to collapse all expired records to make it cleaner, visibility-wise. Does anyone have any tips on how to approach this? Most of what I am finding involves a nested gridview, however I'm not sure if that pertains to this project.

4

1 に答える 1

1

If you are using jQuery in your web page this is simple. Add a css class to those rows you want to hide. And just call the .hide() on them.

$('.greyedout').hide();

Below is a sample which shows hiding of rows is possible. Hope it explains the basic idea to you.

http://jsfiddle.net/deostroll/LVyvR/embedded/result/

于 2012-09-08T15:16:44.290 に答える