user1165952
user1165952

Reputation: 255

Datatables fngetdata associative format

i have a question regarding datatables fngetdata. Im using aData = oTable.fnGetData(aPos); to fetch a row from my datatable. I'm getting the data in array format. so my 1st column data will be aData[0], 2nd will be aData[1] and so on. Can I get the data in associative array format. For example, 1st column name is Group, so can the data be aData[Group]? I need this format because, my datatable is being populated from a mysql table and whenever I expand the table to add columns, I have to change the positions of all other columns. I want to remove the positional dependency. Please advise. Thank you.

Upvotes: 0

Views: 946

Answers (1)

user1165952
user1165952

Reputation: 255

Fixed this using mDataProp option in aoColumns.

Upvotes: 1

Related Questions