-
-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
where did setColumns go? #40
Comments
Maybe the Migration Guide is not clear enough but if you look at the Example code, you will see that the best way to get the I updated the Migration Guide Like this way: angularGridReady(angularGrid: AngularGridInstance) {
this.angularGrid = angularGrid;
this.gridObj = angularGrid.slickGrid;
this.dataViewObj = angularGrid.dataView;
// and any other Services you wish to use
this.gridService = angularGrid.gridService;
} Please don't use any |
BTW I'm not sure what you are trying to do with the code, but aren't you looking for a Grid State & Presets functionality? The Wiki - Grid State & Presets was updated after the new It's also a lot of work for 1 person (me), so if you feel that the examples, wikis are lacking then feel free to mention which wiki should be updated. Our team decided to make it open source, in the hope of bringing feedback and improvement, I think it's going good so far. |
Ok, Thanks again! |
I used to use getColumns()/setColumns() to get/set the visible columns as a subset of the full list of columns.
It looks like I can still use angularGrid.pluginService._grid.setColumns() & ._grid.getColumns() but I don't see that documented anywhere. Also it causes inconsistencies in other variables like visibleColumns and areVisibleColumnsDifferent.
https://stackblitz.com/edit/angular-cjiajg
angularGridReady(angularGrid: AngularGridInstance) {
this.angularGrid = angularGrid;
console.log(angularGrid.gridStateService.getColumns()); // returns []
this.angularGrid.gridStateService.resetColumns(this.columnView); // does nothing?
console.log(angularGrid.pluginService._grid.getColumns()); // returns original columns
this.angularGrid.pluginService._grid.setColumns(this.columnView); // changes columns
console.log(angularGrid.pluginService.areVisibleColumnDifferent); // false should be true
console.log(angularGrid.pluginService._grid.getColumns()); // returns the partial list
}
The text was updated successfully, but these errors were encountered: