Persisting column config issue
I'm looking to persist the column config by using localstorage but the problem is if I have the selection checkbox within the columns, it keeps on adding the checkbox whenever I refresh the page. Is there a way I can remove the checkbox from the column config?
Thanks
I had sort of the same problem, and since the checkboxes column has a precise name i find it and skip it. I hope that can help you.
How do you skip it? The column name for the checkbox column is a tick mark.
If with column config you meant column definitions, this is what i do
gridApi.grid.columns.filter(function noCheckboxes(col) {
return col.name !== 'selectionRowHeaderCol'
}).map(function copyCol(col) {
var colDef = col.colDef
// ...
})
Thanks for your help. I was able to implement it in ng-grid. Now I'm moving to ui-grid. How can I do this w/o asking the user to save and restore states?
Like the user moved columns. When comes back to this page, he should see the changed order of columns in the grid. This needs to be done for everything, ie, grouping, column show/hide etc
Actually, there's a better and straightforward way to get those columns which is getOnlyDataColumns.
To answer your question, you could simply set listeners for any event of interest. E.g. groupingChanged event.