I am creating a GWT app with a DataGrid. The DataGrid hierarchy is:
RootLayoutPanel->DockLayoutPanel->DockLayoutPanel->LayoutPanel->DockLayoutPanel->DockLayoutPanel->DataGrid
Apart from the adding to RootLayoutPanel, the structure is all defined in uiBinder XML
The DataGrid is included in the XML using the following code
<g:ScrollPanel>
<c:DataGrid ui:field='ownershipGrid' visible="true"/>
</g:ScrollPanel>
In my view I have
@UiField
DataGrid<OwnershipInformation> ownershipGrid;
...
ownershipGrid = new DataGrid<OwnershipInformation>(OwnershipInformation.KEY_PROVIDER);
ownershipGrid.setMinimumTableWidth(140, Style.Unit.EM);
ownershipGrid.setKeyboardSelectionPolicy(HasKeyboardSelectionPolicy .KeyboardSelectionPolicy.ENABLED);
... add comlumns to ownershipGrid ...
ownershipInformationList.addDataDisplay(ownershipGrid);
However, I still don't get my table to show. I have called ownershipGrid.getRowCount() and it shows as having 6 rows, so I know that data is there. The panels in which the DataGrid is contained are all visible.
Regards, Richard
The problem is that after adding the DataGrid in the uiBinder, I then call new and point the private variable to a different DataGrid that isn't being displayed.