Assign Row ID to Json Data
Assign Row ID to Json Data
Hello to all, I have few questions :
1. Does JQuery Data Table will automatically add a row id for each row data return server side in json array ?
2. If yes, how to retrieve the row id if have a delete button on the particular row ?
3. How to retrieve the data for the particular row base on row id ?
Please help.
Thanks.
1. Does JQuery Data Table will automatically add a row id for each row data return server side in json array ?
2. If yes, how to retrieve the row id if have a delete button on the particular row ?
3. How to retrieve the data for the particular row base on row id ?
Please help.
Thanks.
This discussion has been closed.
Replies
Yes, if you use the `DT_RowId` property in the data source object for the row. DataTables will automatically add the row ID.
> 2. If yes, how to retrieve the row id if have a delete button on the particular row ?
`$(row).parents('tr').attr(id')` ?
> 3. How to retrieve the data for the particular row base on row id ?
Get the node using normal jQuery / DOM and then use fnGetData.
Allan