Hello,
Is their a way where i can bind an Id with row in datatables?
I get 3 columns from my database and display 2 in datatable to user, but what i want is to attach 1th column (which is Id) to whole row so that when user clicks on a particular row, it takes user to different page depending on Id.
ex
also oObj.aData[0] always comes out as undefined? i am showing FullName and Age but want user to click on row level.
Any help will be appreciated
Thanks
Is their a way where i can bind an Id with row in datatables?
I get 3 columns from my database and display 2 in datatable to user, but what i want is to attach 1th column (which is Id) to whole row so that when user clicks on a particular row, it takes user to different page depending on Id.
ex
"aoColumns": [
{ "mData": "Id",
"bSearchable": false,
"bSortable": false,
//"bVisible": false,
"fnRender": function (oObj) {
return '<a href=\"Details/' + oObj.aData[0] + '\">Id</a>';
}
},
{ "mData": "FullName" },
{ "mData": "Age" }
]
and this is what i get in Json{"sEcho":"1","iTotalRecords":1,"iTotalDisplayRecords":1,"aaData":[{"Id":425,"FullName":"xxx","Age":21,}]}
also oObj.aData[0] always comes out as undefined? i am showing FullName and Age but want user to click on row level.
Any help will be appreciated
Thanks