Assign ID to TD elements of datatable
Assign ID to TD elements of datatable
Pranav
Posts: 1Questions: 1Answers: 0
Hi is there a was to assign ID's to TD elements of Datatable. I have the Id,s in aoColumns as below.
"aoColumns": [
{"mData": "lastName"},
{"mData": "firstName"}
]
Can i make use of them or is there a way to assign them in json response? My Json response Object is being formed as below:
obj.put("lastName", VO.getLastName()));
obj.put("firstName", VO.getFirstName()));
lastName and firstName are my Id's that i have to assign to TDs.
Thanks
This discussion has been closed.
Answers
You could try patching up the rows to include your ID's as they are created using the createdRow callback.
An alternative would be to wrap the data for your cells into spans, and add the ID's to the spans.
The
columns.createdCell
option can be used to modify the cell node, including adding IDs.Allan