New option to interpret first column in json data as table row id

New option to interpret first column in json data as table row id

sronsieksronsiek Posts: 52Questions: 11Answers: 0
edited October 2011 in Feature requests
Hi,

To minimise data transfer volume (for large tables) between server
and client, the use of Ajax/json seems appropriate, since this method
can avoid the transfer of many-time repeated td and tr html tags,
sending data with low overhead.

For a number of reasons it is common practice to place a data records
'id' in the id tag of table rows (for instance, the JQuery DataTables Editable
plugin relies on this).

This issue has already been raised in the past, and the DT_RowId (and DT_RowClass)
mechanisms were introduced to apply such ids. However, this requires that
ALL data passed from the server is passed with indexes defining the context
of the following data, as illustrated in the server response shown here:

http://datatables.net/release-datatables/examples/server_side/select_rows.html

The indexes are repeated for every item every row ... representing in total a
substantial data overhead (as well as the client-side processing).

Since row id assignment is such a common task, I would suggest the
following improvement:

A new boolean option, supplied at data table declaration, to signify that the first
item in the json data array for a row is the tr id. Alternately an integer could point to
the index within the json data where the tr id is located - more flexible.

I'd be interested about your thought,

cheers,
Stefan Ronsiek
This discussion has been closed.