How can I change the order that the columns are displayed in after the datagrid has been rendered and loaded ?
What I would like to do is to provide an array of field names and have the table columns change to be in the same order as the array:
var order = ['five','three','one','two','four']
dg.datagrid('order',order);
I will save this order into a cookie and use it when the page is reloaded to present the columns in the user's desired order.
Ultimately it would be good if this order could be used before the datagrid is rendered instead of loading the hard-coded columns array and then re-sorting again after.
But it also needs to be changed on the fly so that when the user selects a different order, the loaded datagrid column order changes automatically.
Is there an event that could be called before the columns are loaded i.e. a columnLoadFilter() that performs the same way that the row load Filter does.
This would be a nice enhancement !