I bound igGrid data with rowTemplate.
my setting as follow:
.igGrid({
autoGenerateColumns: false,
rowTemplate: ds.RowTemplate,
columns: ds.Columns,
dataSource: ds.Table,
jQueryTemplating: true,
updateUrl: "/Update/UpdateDetails?updatedRows=" + JSON.stringify(detailsViewModel.updatedRows()) ,
virtualization: false, // turn off when use jQueryTemplating
localSchemaTransform: true,
autoCommit: true,
defaultColumnWidth: 180,
width: "1024px",
height: "600px",
features: [
{
name: 'Resizing',
deferredResizing: true,
allowDoubleClickToResize: true
},
name: 'Selection',
mode: 'row',
multipleSelection: false
name: 'Sorting',
type: "local"
name: "Updating",
editMode: "cell",
enableAddRow: false,
enableDeleteRow: false,
columnSettings: ds.ColumnSettings
}
]
});
When invoke grid.igGrid("saveChanges"); The server is update successful return true. {"Success":true}
but the web page client does not fresh. It still remain the old value.
How do I resolved this issue?
And It has another problem:
when I click one cell to update, I need to click the mouse button twice. what's this issue?
Hi,
Whether edit mode begins with 1 or two clicks is determined by the value of the startEditTriggers option. So if you'd like to have Click instead of dblclick, you can set it to "click". For the MVC wrapper configuration, this will be something like:
StartEditTriggers(GridStartEditTriggers.Click)
About the UpdateUrl, and saveChanges() , if Success is set to true in the response, the grid automatically calls commit() , which means the values should be updated. I am not sure what you expect? I mean are you passing yet new values from the server , after the call to saveChanges () ? I see in your sample code that you have autoCommit set to true, which basically means that upon edit end, the changes will be automatically committed to the local data Source, and then they will be persisted on the server, if you call saveChanges().
thanks,
Angel
Thanks for your answer. I don't know the reason.
But for the click behavor, there is one bug when I setting the selection feature:
If I set the feature, the igGrid need click twice.
When you have Selection and Updating features the behavior is:
This is by design because if you enter directly in cell edit mode there will be no way to select a row(or cell).
Hope this helps,
Nadia
OK, Thanks.