I followed the PagingGridExample.java from the explorer demo. The code is exactly the same, except that I am using my own DataItem instead of Post. As well, instead of being its own class, I just have a method "createTable()" that runs the code found inside PagingGridExample.java asWidget() . I'm having a few problems with it though.
The grid loads, however paging doesn't work. I set:
However, even though the toolbar shows and shows the text: "Displaying 11 - 20 of 28", etc, the grid shows all 28 rows. When I click the buttons in the paging toolbar, the grid refreshes, but still shows all 28 rows on each page.
final PagingToolBar pagingToolBar = new PagingToolBar(10);
Also, the paging tool bar is unusually thick. I have to change the parameters of the VerticalLayoutData in order for it to show:
The overall layout is a DockLayoutPanel with a gxt TabPanel in the center. The grid is placed on a tab within a gwt VerticalPanel. All the other code is the same as in the example, except as noted above.
VerticalLayoutContainer con = new VerticalLayoutContainer();
con.add(grid, new VerticalLayoutData(1, 0.80));
con.add(pagingToolBar, new VerticalLayoutData(1, 0.20));
I have attached a screenshot. Would appreciate any help!