Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

ListGrid editing not working after SmartGWT upgrade

$
0
0
Hi, I have recently upgraded from SmartGWT 3.0/GWT 2.0.4 to SmartGWT 5.0/GWT 2.7.0. After this upgrade, my editable ListGrid is not working. The records obtained do no contain updated value (i.e., if I select a value in UI, this value is not returned by . While trying to edit the grid, in the browser console I see this: Uncaught RangeError: Maximum call stack size exceeded ISC_Core.js.

Here is my code, please let me know if there is a change I need to do for the upgrade:

private class MyGrid extends ListGrid {

public MyGrid(String id) {
this.setID(id);
this.setLeaveScrollbarGap(false);
this.setShowAllRecords(true);
this.setCanResizeFields(true);
this.setCanSort(false);
this.setCanGroupBy(false);
this.setCanEdit(true);
this.setCanFreezeFields(false);
this.setSelectionType(SelectionStyle.SINGLE);
this.setModalEditing(true);
this.setData(recordList);
this.setEditEvent(ListGridEditEvent.CLICK);
this.setHeight("50%");
this.setCanFocus(true);
this.initUI();
this.addSelectionChangedHandler(new SelectionChangedHandler() {
public void onSelectionChanged(SelectionEvent event) {
Record eventRecord = event.getRecord();
int eventRecordRowNum = getRecordRowNum(eventRecord);
ListGridRecord selectedRecord = myGrid.getSelectedRecord();
int selectedRecordRowNum = getRecordRowNum(selectedRecord);

// de-select and select events fire in different sequence depending on add button or row select switch;
// add button - selection first, then deselection.
if (event.getState()) { // current selected row
delBtn.setDisabled(selectedRecord == null);
simpleConditionForm.setSelectedRowNum(eventRecordRowNum);
simpleConditionForm.refresh();
} else { // previous selected row
if (eventRecordRowNum >= 0 && selectedRecordRowNum == -1) {
saveRecordAndConditions(eventRecord);
}
}
}
});
}

Viewing all articles
Browse latest Browse all 4756

Trending Articles