Updating properties of only a given column
Updating properties of only a given column
I am initializing all my datatables like this
$('.dataTable').dataTable({
"sPaginationType" : "full_numbers"
});
After I have done the initialization, I now want to set properties on some of the columns of a specific datatable.
Is there a function like getColumnByName that I can use and then use the column object to set some properties on it ?
In pseudo-code this is what I would like to do:
var column = myTableObj.getColumnByName("aNumericColumn");
column.setRenderer("RenderDecimalNumber");
column.setProperty("decimalPlaces" , "2");
myTableObj.redraw();
$('.dataTable').dataTable({
"sPaginationType" : "full_numbers"
});
After I have done the initialization, I now want to set properties on some of the columns of a specific datatable.
Is there a function like getColumnByName that I can use and then use the column object to set some properties on it ?
In pseudo-code this is what I would like to do:
var column = myTableObj.getColumnByName("aNumericColumn");
column.setRenderer("RenderDecimalNumber");
column.setProperty("decimalPlaces" , "2");
myTableObj.redraw();
This discussion has been closed.
Replies
A longer term plan for DataTables will be to offer that ability, but I'm afraid it is not present at the moment - you need to set such options up front.
Allan