Hello yuanru,
The row’s id and its index are different – the id is determined by the datafield passed to the source id property, e.g.:
var source =
{
datatype: "json",
datafields: [
{ name: 'name', type: 'string' },
{ name: 'type', type: 'string' },
{ name: 'calories', type: 'int' },
{ name: 'totalfat', type: 'string' },
{ name: 'protein', type: 'string' }
],
id: 'id',
url: url
};
However, if no id is specified, the row’s id is equal to the row’s bound index. The bound index is the row’s index not considering sorting, filtering and paging. The row’s visible index is determined by taking in mind the applied sorting, filtering and paging.
Best Regards,
Dimitar
jQWidgets team
http://www.jqwidgets.com/