Return Row ID and Data- in a hidden column with Ajax
Return Row ID and Data- in a hidden column with Ajax
andras2
Posts: 31Questions: 12Answers: 0
in DataTables
Hi there,
I would like to ask how it is possible to to retrive the (AJAX) data of a selected row? Eg. I click on a row and retrive the full data into input fields including hidden columns such as row ID.
This question has accepted answers - jump to:
Answers
Start with this example to get the data. You can then populate your form with the data.
Kevin
Thank you. It seems fine without checkbox. Can you help me if I use checkbox?
What seems to be the problem when using the checkbox? Please provide atest case showing the issue.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
One problem might be this:
Your data structure is objects, ie, using
columns.data
, but you are trying to access the data using array notationdata[1]
. You should usedata.id
.Kevin
Could you help me please, how to change cursor type to _.pointer {cursor: pointer;} _for the get data script?
https://datatables.net/examples/advanced_init/events_live.html
It just takes standard CSS settings to apply the cursor type to the elements you want. This should apply to all
td
elements:Kevin