4

I am working with layout panels and datagrid. When I set the datagrid height to 100%, Grid is not rendering. My panel hierarchy looks like the following image

enter image description here

Am I doing it properly or I messed up the panel hierarchy???

Parent panel is the simple layout panel, inside that I have split layout panel -> scrollpanel -> datagrid

Abhijith Nagaraja
  • 3,370
  • 6
  • 27
  • 55

2 Answers2

6

DataGrid requires to be put in a LayoutPanel or Panel that implements the ProvidesResize interface to be visible. ScrollPanel implements that interface.

Furthermore this chain of LayoutPanels from your DataGrid up to your root element/panel has to be unbroken. That seems to be the case in your panel hierarchy.

Finally you have to use the RootLayoutPanel instead of the RootPanel to add your LayoutPanels.
So did you make sure that you add your SimpleLayoutPanel to the RootLayoutPanel ?

Ümit
  • 17,379
  • 7
  • 55
  • 74
  • yes i added SimpleLayoutPanel to the RootLayoutPanel, but no success – Abhijith Nagaraja Aug 10 '12 at 03:55
  • can you check with the Developertools from Chrome or Firebug from Firefox, how the HTML structure looks like and maybe also post your Ui:binder xml structure or if you create the Panels via code the sourcecode – Ümit Aug 10 '12 at 13:39
  • I got it right now... somewhere in the hierarchy I have used vertical panel. I corrected it. – Abhijith Nagaraja Aug 11 '12 at 14:44
0

In my case it was caused by this: DataGrid rows not visible in second tab of TabLayoutPanel

slonik
  • 1,144
  • 11
  • 13