Hello, we've noticed that discardAllEdits is not working properly.
Please see the following example:
http://www.smartclient.com/index.jsp#editByCell
Use the following code which ensures that autoSavedEdits is false and then edit multiple rows. If you click the top button that says "Discard All Edits", it does not change the value in the cell back to the original value until you actually click on the cell and then click out. The only cells that are discarded properly are for the currently selected row. The second button for Discarding edits for the current row seems to work fine though.
Please see the following example:
http://www.smartclient.com/index.jsp#editByCell
Use the following code which ensures that autoSavedEdits is false and then edit multiple rows. If you click the top button that says "Discard All Edits", it does not change the value in the cell back to the original value until you actually click on the cell and then click out. The only cells that are discarded properly are for the currently selected row. The second button for Discarding edits for the current row seems to work fine though.
Code:
isc.ListGrid.create({ ID: "countryList", width:550, height:224, alternateRecordStyles:true, showAllRecords: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:"countryCode", title:"Flag", width:40, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png", canEdit:false}, {name:"countryName"}, {name:"continent"}, {name:"member_g8"}, {name:"population", formatCellValue:"isc.Format.toUSString(value)"}, {name:"independence"} ], autoFetchData: true, autoSaveEdits:false, canEdit: true, editEvent: "click" }) isc.IButton.create({ top:225, width:250, title:"Discard All Edits", click:"countryList.discardAllEdits();" }) isc.IButton.create({ top:275, width:250, title:"Discard Edits for Current Row", click:"countryList.discardEdits(countryList.getEditRow());" })
Comment