PDA

View Full Version : Grid doesn't display items



Lyrical_Tokarev
26 Jun 2013, 11:20 PM
Trying to add grid in dialog window.
data added to grid, but not displaying

hoping for your advise



final ListStore<UserInfo> userListStore = new ListStore<UserInfo>();


userListStore.add(userList);


setSize(500, 500);


MessageBox.info("testUSERLISTSTORE", Integer.toString(userListStore.getCount()), new Listener<MessageBoxEvent>() {
public void handleEvent(MessageBoxEvent be) {


}
});


ColumnConfig password = new ColumnConfig("password", "Pas", 100);


ColumnConfig fullname = new ColumnConfig ("fullNameField1", "Name of User", 200) ;


List<ColumnConfig> configs = new ArrayList<ColumnConfig>();


configs.add(fullname);


configs.add(password);


ColumnModel cm = new ColumnModel(configs);


final Grid<UserInfo> UserListGrid = new Grid<UserInfo> (userListStore, cm) ;


UserListGrid.getView().setForceFit(true);


add(UserListGrid);


UserListGrid.setAutoExpandColumn("fullNameField1");


UserListGrid.getView().ensureVisible(5,5, true);






MessageBox.info("testGRID", Integer.toString(UserListGrid.getStore().getCount()), new Listener<MessageBoxEvent>() {


public void handleEvent(MessageBoxEvent be) {


}
});


setTitle("UserList");