refreshColumns

refreshes the structure of DataTable

void refreshColumns( [array config,boolean reset] );

Parameters

configarrayarray with new configurations for the columns
resetbooleanif true, shows columns hidden by user before (false by default)

Example

dtable.refreshColumns();

Details

When used without an argument, the method redraws currect grid structure.

You can use this method to refresh structure of datatable after modifying some properties of columns collection.

dtable.config.columns[2].id = "newPrice";
dtable.config.columns[2].width = 500;
dtable.refreshColumns();

Or, with new config provided, set a completely different columns.

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.