Reputation: 2399
I have a function that I'm going to use with several different Grids. In this function I want to set Grid's Id field which varies in different Grids.
How can I get each grid's ID?
function incId(e) {
var model = e.model;
var grid = e.sender;
//removed
model.set(!IDFIELD!, ++Id);
}
Upvotes: 0
Views: 337
Reputation: 2596
You can use model.idField
to get it
model.set(model.idField, ++Id);
Please read its documentation for further investigation
Upvotes: 1