How to add a GridPanel within one of the tabs of a tabpanel?
Printable View
How to add a GridPanel within one of the tabs of a tabpanel?
Hello, @TransBIRptSup!
- If you want the grid and other components within a tab (for instance, you can use the grid without using the whole tab width/height)
Simply add the grid panel as one of the items within a panel used as a tab.
- If all you want as the tab is a grid (so that the tab is fully filled by the grid data and behaves as a grid itself)
Add the grid directly to the tab panel list of items.
In other words, respectively:
Notice how the first grid needs width/height. It means the surrounding panel's layout will be followed. When you add the grid straight to the tab panel, its title is the tab handle name, and its contents will fit the tab panel. As it would a normal panel with the border or fit -- among a few other -- layouts.Code:<ext:TabPanel runat="server" ID="TabPanel1" width="800" height="600">
<Items>
<ext:Panel runat="server" Title="Panel with grid inside">
<Items>
<ext:GridPanel runat="server" Title="My Grid Panel" Width="200" Height="200" />
</Items>
</ext:Panel>
<ext:GridPanel runat="server" Title="Grid as a tab itself"></ext:GridPanel>
</Items>
</ext:TabPanel>
Hope this helps!