Hi,
I'm currently working on a ListGrid that's editable where when a user presses an add a new row button from the tooolbar after selecting a row from the Grid, a new row is supposed to be added based on "addAt"method of RecordList with its index specified. However the row is not getting added and I'm getting a warning message that says
*15:48:04.373:MUP3:WARN:Log:ResultSets are readonly. This operation (addAt) will be ignored.
Below is my code where I'm trying to add a blank record at a specified position in the Grid
marketAddBtn = Buttons.makeToolButton("", "Add", ButtonType.Add, new ClickHandler() {
public void onClick(ClickEvent event) {
ListGridRecord rec = new ListGridRecord();
rec.setAttribute("mid", "352");
int index=grid.getDataAsRecordList().indexOf(grid.getSelectedRecord());
grid.getRecordList().addAt(rec, index);
}
});
Can someone please help me to overcome this warning and get the record created?
I'm currently working on a ListGrid that's editable where when a user presses an add a new row button from the tooolbar after selecting a row from the Grid, a new row is supposed to be added based on "addAt"method of RecordList with its index specified. However the row is not getting added and I'm getting a warning message that says
*15:48:04.373:MUP3:WARN:Log:ResultSets are readonly. This operation (addAt) will be ignored.
Below is my code where I'm trying to add a blank record at a specified position in the Grid
marketAddBtn = Buttons.makeToolButton("", "Add", ButtonType.Add, new ClickHandler() {
public void onClick(ClickEvent event) {
ListGridRecord rec = new ListGridRecord();
rec.setAttribute("mid", "352");
int index=grid.getDataAsRecordList().indexOf(grid.getSelectedRecord());
grid.getRecordList().addAt(rec, index);
}
});
Can someone please help me to overcome this warning and get the record created?
Comment