Expand-Collapse feature in gridview
I have an ASP.Net default GridView in VS 2008. Now if I click history column, I need to expand column (by clicking right arrow '>') and beneath display the necessary data. It should be collapse when clicking the right arrow again.
One way is using Collapsible Panel of AJAX and othe开发者_Python百科r (not sure) is div. But I am not sure how to use either of them inside GridView satisfying the requirement as mentioned above.
Please help me! Let me know if any query.
Thanks!
Take a look at the generated source and you should see that your ASP.Net GridView renders as a HTML table. It may not be the best solution but you could use some jQuery to hide all <td>
and <th>
of a certain CSS class, ID or name (which you can assign manually in your .aspx) when you click on the button.
精彩评论