refreshes the structure of DataTable
config | array | an array with new configurations for the columns |
dtable.refreshColumns();
When used without an argument, the method repaints the current grid structure.
Use it to refresh the structure of Datatable after modifying some properties in its columns collection:
dtable.config.columns[2].id = "newPrice";
dtable.config.columns[2].width = 500;
dtable.refreshColumns();
Or to change columns completely:
var config = [
{id:"col1", header:"First Name", width:150},
{id:"col2", header:"Last Name", width:150}
];
dtable.refreshColumns(config);