I have problem with grouped listGrid. When adding a new record the new record disappears after saving. It is shown again after a call of “listGrid.groupBy” .
The code is an extension of feature-explorer ListGrid “grouped Editing” example.
When pressing the button “New record” a new record with countryName: "New Country", continent:"South America" is added at the end.
Pressing “enter” to end editing saves the record and the record disappears.
Press the button “regrouping“ and the new record is shown at the end of the listgrid.
The code is an extension of feature-explorer ListGrid “grouped Editing” example.
When pressing the button “New record” a new record with countryName: "New Country", continent:"South America" is added at the end.
Pressing “enter” to end editing saves the record and the record disappears.
Press the button “regrouping“ and the new record is shown at the end of the listgrid.
Code:
isc.ListGrid.create({ ID: "countryList", width:522, height:224, alternateRecordStyles:true, cellHeight:22, // 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:"government"}, {name:"continent"}, ], canEdit: true, editEvent: "click", groupStartOpen:"all", groupByField: 'continent', autoFetchData: true, canRemoveRecords: true }) isc.Button.create({ ID: "newBtn", title: "new record", click : function () { countryList.startEditingNew({ countryName: "New Country", continent:"South America"}); } }); isc.Button.create({ ID: "regroupBtn", title: "regrouping", click : function () { countryList.groupBy( "continent"); } }); isc.VStack.create( {members :[ countryList, newBtn,regroupBtn]});
Comment