reading Mvc razor model cell data
reading Mvc razor model cell data
I just came to know that when we use razor model data in mvc with datatables like
<td>
@Html.TextBoxFor(modelItem => item.JobID)
</td>
cells(). data will not return any data . like
var table = $('#example').DataTable()
table.on('click', function () {
alert($('td', this).eq(0).text());
var data = table.cells(this,0).data();
alert(data);
})
Any one else experienced the same is there something i got wrong. i saw some article said only displayfor and editorfor is not supporting to extract data but textboxfor is not helping either.
Please help if someone could . thank you.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Changing the click event selector seems to help:
http://live.datatables.net/begavape/1/edit
Kevin
@Kevin Thanks a lot bro 'td was the missing piece.
Thanks mate