How to get Column value of Selected Row

How to get Column value of Selected Row

mithunprasadmithunprasad Posts: 4Questions: 0Answers: 0
edited April 2014 in General
Hi
I have a table with eleven columns the eleventh column has two buttons one for edit and another one for delete.When i press the Edit button .I have to get the second column value of the selected row in a Table.

I tried the following code :



$("#datatable tbody").delegate("tr", "click", function() {
var iPos = userTable.fnGetPosition( this );
if(iPos!=null){

var aData = userTable.fnGetData( iPos );//get data of the clicked row
var iId = aData[1];//get column data of the row
alert(iId);

}
});

It is been coded to get the column value when the row is clicked.but i have to get the column values when button is press. can any one help me how to do it

Thanks,
Mithun
This discussion has been closed.