Thursday, July 26, 2012

Re: how to get the datagrid running?

still not working. my ui.xml is:

<!DOCTYPE ui:UiBinder SYSTEM "">

<!-- DataGrid. -->
<c:DataGrid ui:field='cellTable' visible="true"/>

<!-- Pager. -->
<g:south size="3">
<table style="width:100%">
<c:SimplePager ui:field='pager' location="CENTER"/>

which is a copy of the showcase example.

it does show if i create everything manually:
cellTable = new DataGrid<Contact>(15);
pager = new SimplePager(SimplePager.TextLocation.CENTER);
DockLayoutPanel ret = new DockLayoutPanel(Style.Unit.PX);
initUIComponents();//configures columns, adds data
ret.addNorth(cellTable, 500);
ret.addSouth(pager, 100);
return ret;//is added to a rootlayoutpanel

but here, i cannot see the pager even though it's on the page.

if i use a vertical panel instead of a docklayoutpanel and a celltable instead of a datagrid, everything works as expected.

2012/7/26 Thomas Broyer <>

On Thursday, July 26, 2012 10:32:42 AM UTC+2, Dennis Haupt wrote:
i tried to follow the example here:

but it doesn't even compile.
there is no implementation of the interface CwConstants, the field "constants" is final but never initialized and the method "onInitialize" has an override annotation but overrides nothing.
what am i missing?

Some classes/interfaces are not really relevant to the example so they're not included in the "Source code" drop-down.
The Showcase full source code is in the GWT SDK though (in the "samples" directory), and can thus of course be found in the source repo:
if i skip all this and just try to get a simple datagrid running, all its cells are invisible, but i can see they exist in the generated source code.
is there another example that works?

DataGrid is a RequiresResize, did you put it in a ProvidesResize container? (any kind of layout panel: RootLayoutPanel, DockLayoutPanel, LayoutPanel, etc.)
Alternately you can give it explicit dimensions (preferably in pixels). 

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment