table cell attribute (id) AJAX data source
table cell attribute (id) AJAX data source
sametchell
Posts: 1Questions: 0Answers: 0
Hi all
I can successfully populate a table with the data source being from an asp.net server based AJAX call. However I need to add an attribute to certain table cells within a row. I can add attributes to the table row using the fnRowCallBack function, such as:
[code]
"fnRowCallback": function(nRow, aData,iDisplayIndex, iDisplayIndexFull){
$(nRow).attr('id','myIdVal');
return nRow;
}
[/code]
Is there anyway to add an attribute to the table cells (td elements) within the nRow, the aData array doesn't contain HTML objects so I figure it cant be done in this call back function?
I can successfully populate a table with the data source being from an asp.net server based AJAX call. However I need to add an attribute to certain table cells within a row. I can add attributes to the table row using the fnRowCallBack function, such as:
[code]
"fnRowCallback": function(nRow, aData,iDisplayIndex, iDisplayIndexFull){
$(nRow).attr('id','myIdVal');
return nRow;
}
[/code]
Is there anyway to add an attribute to the table cells (td elements) within the nRow, the aData array doesn't contain HTML objects so I figure it cant be done in this call back function?
This discussion has been closed.