Hi Isomorphic,
I have a ListGrid with saveLocally=true and a cellChanged handler on one of the fields (or on the grid itself for that matter).
In the cellChanged handler, I am referring to the record argument and to grid.data and I am struggling with the following discrepancy:
When the grid is not grouped, and I am adding a new record, the record argument is populated with the new record details and grid.data already includes the new record.
However, when the grid is grouped by any column, record is null and the data does not include the new record.
Here is a sample code based on the showcase in https://www.smartclient.com/smartcli...d=enterNewRows
Try to add a new record and watch the console when the grid is grouped and ungrouped...
Thanks
I have a ListGrid with saveLocally=true and a cellChanged handler on one of the fields (or on the grid itself for that matter).
In the cellChanged handler, I am referring to the record argument and to grid.data and I am struggling with the following discrepancy:
When the grid is not grouped, and I am adding a new record, the record argument is populated with the new record details and grid.data already includes the new record.
However, when the grid is grouped by any column, record is null and the data does not include the new record.
Here is a sample code based on the showcase in https://www.smartclient.com/smartcli...d=enterNewRows
Code:
isc.ListGrid.create({ ID: "countryList", width:500, height:224, alternateRecordStyles:true, // use server-side dataSource so edits are retained across page transitions dataSource: countryDS, // display a subset of fields from the datasource fields:[ {name:"countryName"}, {name:"continent"}, {name:"member_g8"}, {name:"population"}, {name:"independence"} ], autoFetchData: true, canEdit: true, editEvent: "click", listEndEditAction: "next", [B]saveLocally : true, cellChanged: "console.log(record); console.log(grid.data.getItem(rowNum))"[/B] }) isc.IButton.create({ top:250, title:"Edit New", click:"countryList.startEditingNew()" });
Thanks
Comment