I am creating a RadGrid dynamically based on data that comes through. The number of grids can vary. What I want to do is allow for the collapsing of these grids. For example, if 10 grids are created, the length is unwieldy and I would like to collapse all but the first, and have the user be able to expand them on click. I have looked around and do not see a solution within the grid itself. I would like to keep the header row as the column names, and use something above it sort of detailing the grid like "Number of Customers: #".
My theoretical solution was to use a RadPanelBar, inserting the grid into a RadPanelItem, and then into the PanelBar. Looking at the demo of the calendar shows:
However, I am required to create this from the codebehind. I've gone through quite a few iterations and can't seem to find the syntax. I am guessing it has to do with ItemTemplate.InstantiateIn(grid), but do I have to extend the ITemplate or something?
My theoretical solution was to use a RadPanelBar, inserting the grid into a RadPanelItem, and then into the PanelBar. Looking at the demo of the calendar shows:
<telerik:RadPanelBar runat="server" ID="RadPanelBar1" Height="380px" ExpandMode="FullExpandedItem"> <Items> <telerik:RadPanelItem Text="Calendar" ImageUrl="Img/calendar.gif"> <Items> <telerik:RadPanelItem> <ItemTemplate> <telerik:RadCalendar runat="server" ID="Calendar1" Style="margin: 6px auto 0" /> </ItemTemplate> </telerik:RadPanelItem> </Items> </telerik:RadPanelItem> </Items></telerik:RadPanelBar>However, I am required to create this from the codebehind. I've gone through quite a few iterations and can't seem to find the syntax. I am guessing it has to do with ItemTemplate.InstantiateIn(grid), but do I have to extend the ITemplate or something?