java - How does one dynamically add a row to a GXT grid -


i'm attempting add row gxt grid , failing miserably. i'm trying build grid can used in filter. has datefield , 2 buttons add , remove. add should take date date field , add grid. remove should remove selected item grid.

enter image description here

the problem that, when add date the grid's store, cannot figure out how display on grid. i've tried different combinations of loader.load(), view.refresh(), grid.configure() , fired events.

addbutton = new button("add");     addbutton.setvisible(true);     addbutton.addselectionlistener(new selectionlistener<buttonevent>(){         @override         public void componentselected(buttonevent ce) {             if(datefield.getvalue() != null) {                  gwtdate date = gwtdate.decodefromjavadate(datefield.getvalue());                 grid.getstore().add(date);                 //grid.getstore().getloader().load();                 //grid.getview().refresh(true);                 grid.reconfigure(grid.getstore(), grid.getcolumnmodel());                  fireevent(events.change);             }          }     });      toolbar.add(addbutton); 

i can't find in way of documentation these old versions of gwt/gxt i'm hoping can help. thank you.

gxt version 2.2.3 gwt version 2.2.0

the problem 1 of sizing - grid inside menu has been set no layout , no size, , expected grow fit content (since how menus work), many data views, not function without explicit size given can add scrollbars needed.

either give size, set layout parent, or "auto-height grid" example/workaround, making sure understand ramifications of using it.


also note gwt 2.2 , gxt 2.2.3 5 years out of date, , gxt 2 end-of-life'd year ago when gxt 4 released. there may other issues them , browser version released since then.


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -