refreshColumns

refreshes the structure of DataTable

void refreshColumns( [array config] );
configarrayan array with new configurations for the columns

Example

dtable.refreshColumns();

Details

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);
See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix javascript website framework and page of javascript data grid product.