How can I set cell id in json loading? In the following example, it passes cell value only. When I serialize my grid, I need cell id and value.
{
rows:[
{ id:10910,
data:[
“400”,
“Cousin Bette”,
“Honore de Balzac”,
“0”,
“1”,
“12/01/1991”] }
]
}
You can use updated json extension
dhtmlx.com/docs/products/kb/inde … 0attribute
which allow to define cell level attributes
Thank you so much for the quick response!
By using this extension, my grid renders fine if I pass “id” and “value” attribute but when I serialize the grid, I don’t get my cell “id” back.
You can use the following approach in order to include custom attribute into serialization:
grid.xml.cell_attrs.push(“id”);
Please, see the article:
dhtmlx.com/docs/products/dht … .html#k2tm
Serializtion level should contain “full xml” as enabled:
grid.setSerializationLevel(false,true,…);