Hi,
Consider a listGrid, which has initally 5 records from dataBase, now edit any one records, dont save the changes. My requirement in this case is, i need to get all the record values both edited and unedited.
In the below example, edit any record and select that record, and while clicking on Print button, you wont get the edited value instead getting the db value. But there is a method getEditedRecord() to get the edited value. But my requirement is, make some records edited and some records unedited, now apply selectAll(), and by getSelection() get all the records and print the va;ue, you will be getting only the db value and not the edited value. I need both edited and unedited values.
isc.ListGrid.create({
ID: "countryList",
width:500, height:224, alternateRecordStyles:true, showAllRecords:true, cellHeight:22,
// use server-side dataSource so edits are retained across page transitions
dataSource: countryDS,
autoSaveEdits : false,
// display a subset of fields from the datasource
fields:[
{name:"countryName"},
{name:"continent"},
{name:"member_g8"},
{name:"population",
formatCellValue:"isc.Format.toUSString(parseInt(value))"},
{name:"independence"}
],
autoFetchData: true,
canEdit: true,
editEvent: "doubleClick",
listEndEditAction: "next"
})
isc.IButton.create({
top:250,
title:"Edit New",
click:"countryList.startEditingNew()"
});
isc.IButton.create({
top:250, left:270,
title:"Print",
click: function() {
var record = countryList.getSelectedRecord();
alert(record.countryName);
}
});