Overview
I have an application that consists of a SplitLayoutPanel that has a StackLayoutPanel with two menu selections on the left and a DeckLayoutPanel on the right. The DeckLayoutPanel has two subpanels, one a SimpleLayoutPanel containing a Label and one a DockLayoutPanel containing a Label and another SimpleLayoutPanel. The last SimpleLayoutPanel contains a DataGrid.
SplitLayoutPanel (TestUI)
|
+ StackLayoutPanel
| |
| + CellList (Profile)
| |
| + CellList (Admin)
|
+ DeckLayoutPanel
|
+ SimpleLayoutPanel
| |
| + Label
|
+ DockLayoutPanel (BudgetPanel)
|
+ Label
|
+ SimpleLayoutPanel (LedgerPanel)
|
+ DataGrid
All subpanels have their height and width set to 100% by their containing panels.
Expected Behavior
The expected behavior is that clicking on the "Budget" menu item in the StackLayoutPanel will show the BudgetPanel, including the LedgerPanel's DataGrid.
Observed Behavior
When the "Budget" menu item is clicked, the DockLayoutPanel is displayed, with its header Label, the DataGrid column headers are displayed, but the DataGrid rows do not appear.
When a Label is added to the south area of the DockLayoutPanel, the application compiles but nothing is displayed, not even the top level StackLayoutPanel.
When the DataGrid is replaced with a CellTable, the data is displayed (although the height of each row is much more than necessary to hold the data).
Questions
What needs to be done to get the DataGrid to display as expected?
How can the rows be styled to have a smaller height?
Source Code
The full source code demonstrating this problem is available on GitHub.
DeckLayoutPanel
is used internally byTabLayoutPanel
and you have to explictily callredraw
on yourDataGrid
. You can try to replace theDeckLayoutPanel
with a SimpleLayoutPanel` and check if it works. – Ümit