Hello,
Using:
SmartClient Version: SC_SNAPSHOT-2012-02-27_v8.2p/PowerEdition Deployment (built 2012-02-27)
I am doing a pretty simple thing, namely adding a ListGridRecord to a ListGrid, but somehow the grid is not *visually* updated, although the data IS stored in the SQL database.
Here is my listgrid initialization:
Here the code I use to insert the record:
Am I missing something obvious here? It's not much different, apart from some the grid initialization, from this example right?:
http://www.smartclient.com/smartgwt/...operations_add
Using:
SmartClient Version: SC_SNAPSHOT-2012-02-27_v8.2p/PowerEdition Deployment (built 2012-02-27)
I am doing a pretty simple thing, namely adding a ListGridRecord to a ListGrid, but somehow the grid is not *visually* updated, although the data IS stored in the SQL database.
Here is my listgrid initialization:
Code:
public class OrderGrid extends ListGrid { public OrderGrid(){ Log.debug("Initializing OrderGrid"); setAlternateRecordStyles(false); setCellHeight(32); setDataSource(orderedDishes); setAutoFetchData(false); setCanEdit(true); setModalEditing(true); setShowFilterEditor(true); setCanSelectText(true); setCanDragSelectText(false); setFetchOperation("JoinOnPkg"); setAddOperation("addWithPkg"); setUpdateOperation("updateWithPkg"); setDoubleClickDelay(30); setEditEvent(ListGridEditEvent.DOUBLECLICK); setFilterOnKeypress(true); setAllowFilterExpressions(true); setListEndEditAction(RowEndEditAction.DONE); setCanRemoveRecords(false); setAutoSaveEdits(true); setCanDragRecordsOut(false); setCanAcceptDroppedRecords(true); setGroupByField("pkgName"); setGroupStartOpen(GroupStartOpen.ALL); } //... }
Code:
ListGridRecord toAdd = new ListGridRecord(); toAdd.setAttribute("Order__id",order.getAttribute("Order__id")); toAdd.setAttribute("Dish_id", rec.getAttribute("Dish_id")); toAdd.setAttribute("amountOrdered",amountItem.getValue()); grid.addData(toAdd);
http://www.smartclient.com/smartgwt/...operations_add
Comment