Tricky question...I'd really appreciate some help.
I have a gridview with 38 columns. The first three should always be around. The rest should be collapsible in sets of 7 (e.g columns 4-10 should collapse as a unit, 11-17, etc.)
I have found the AJAX Toolkit CollapsiblePanelExtender and it is fantastic. However, it runs off panels, which I don't think I can separate columns into, can I?
Here is the Aj开发者_JAVA百科ax code:
<AjaxToolKit:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" runat="server" TargetControlID="PanelZone1" ExpandControlID="panelZone1" CollapseControlID="PanelZone1" Collapsed="false" AutoCollapse="true" AutoExpand="true">
</AjaxToolKit:CollapsiblePanelExtender>
Is there any way to specify sets of columns as panels for this?
Or is there a better way to try to do this?
Thank you so much for your help!
Use the showColumn and hideColumn client-side methods to show/hide columns from the Grid. Use the Index or the DataField of the column as the parameter for these methods. Hope it helps you.
Have you thought about a nested GridView? You can display some of your columns in the main GridView, then open the Collapsible panel to reveal another GridView with the rest of the columns?
I'm working on a complex system now with a GridView with a Collapsible panel that opens to a Repeater with (you guessed it) ANOTHER Collapsible panel with another repeater inside that. Kinda like this:
GridView
--Collapsible Panel 1
----Repeater 1
------- Collapsible Panel 2
---------- Repeater 2
精彩评论