Override ID property for DataStore item

Hello all!

Are there any way to mark an object property as id one instead of standard “id” object property?

For example I want to provide a ListView with collection of objects and thous objects don’t have the id property.

Hello,

You can define a custom DataDriver:

var myjson = webix.DataDriver.myjson = webix.copy(webix.DataDriver.json);
myjson.getDetails = function(data){
     data.id = data.myprop;
     return data;
}

And then you’ll need to specify the datatype:

data:mydata,
datatype:"myjson"

Check the related article: http://docs.webix.com/desktop__custom_data_types.html

Thanks a million!