I am trying to pull up a listGrid and make changes to it and then commit all of the changes at the end. Right now I am just working on the display side and am using hard coded JS data. It appears that I can add a record and update a record without going back to the server but I can't find a delete function. The removeSelectedData() function goes directly to the server.
On the same topic, am I going to have a problem committing changes from added and updated records? Will the saveAllEdits() function do this?
On the same topic, am I going to have a problem committing changes from added and updated records? Will the saveAllEdits() function do this?
Code:
this.addMembers([
isc.ListGrid.create({
ID: "TPAList",
width:400, height:224, alternateRecordStyles:true, showAllRecords:true,
fields:[
{name:"TPA", title:"TPA"}
],
data: TPAData,
canEdit: true,
editEvent: "doubleClick"
}),
isc.HLayout.create({
members:[
isc.IButton.create({
top:250,
title:"Add New",
click:"TPAList.startEditingNew()"
})
,isc.IButton.create({
top:250,
title:"Edit",
click:"TPAList.startEditing(TPAList.getRecordIndex(TPAList.getSelectedRecord()),0)"
})
,isc.IButton.create({
top:250,
title:"Delete",
click:"TPAList.removeSelectedData()"
})
],
autoDraw:false,
width:"100%",
height:"50px"
}),
isc.IButton.create({
top:250,
title:"Commit Changes",
click:"TPAList.saveAllEdits()",
autoFit:"true"
})
]);
Comment