Custom column with data from other column

Custom column with data from other column

bmaggotbmaggot Posts: 8Questions: 0Answers: 0
edited April 2011 in General
Hello,

I want to do table with editable rows, so I need to have button [EDIT] in last column...
I did
[code]
"aoColumns": [null, null, null, null, null, null, null, null, null, null, null, null,
{ "bSortable": false,
"fnRender": function(oObj) {
return 'Edit'}
}
[/code]
and I would like to know how to get that X (id) from other column...

Replies

  • bmaggotbmaggot Posts: 8Questions: 0Answers: 0
    I mean, I HAVE an ID in other column, I just don't know how to get it..
    I'm really new to this javascript thing.
  • allanallan Posts: 63,520Questions: 1Answers: 10,473 Site admin
    The object passed into fnRender has the data array for the object: http://datatables.net/usage/columns#fnRender . aData is the property you want - you can just pull out the column information needed.

    Allan
  • bmaggotbmaggot Posts: 8Questions: 0Answers: 0
    Thank you! Works.
This discussion has been closed.