开发者

Expand-Collapse feature in gridview

开发者 https://www.devze.com 2023-03-22 20:17 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消