igx-tree-grid column hiding customization
Question
I am using angular 7 igx-tree-grid. I want to customize the design of column hiding functionality. Below are the design changes in Column hiding. 1. Want to reverse the column hiding checkbox(i.e currently if column is hidden checkbox is shown as checked. but i want to uncheck the checkbox if column is hidden) 2. Instead of show all button i need a apply button(i.e Currently if uncheck the checkbox in column it automatically shows the column in grid but i want to select more than one column and if i click on apply button it should the column. otherwise i dont want to show the column in the grid.)
- igniteui-angular version: 7.2.4
- browser: all browser
@kdinev @gedinakova i am waiting for this so long can you please let me know the answer...
@prabakaran1311 Currently, there is no way to achieve any of the requirements listed above. You may review & reuse some of the code and implement a custom component for hiding columns that fulfills the scenario you need.
@gedinakova @kdinev is it possible to add extra buttons next to sho/hide all button in column hiding dropdown.
@prabakaran1311 Adding custom buttons to toolbar is supported via creating an ng-template and marking it with the igxToolbarCustomContent directive. For details, please, refer to the topic & sample.
@gedinakova not in toolbar i need to add button inside column hiding next to show/hide all buttons.
@prabakaran1311 This is not supported.
@gedinakova @kdinev can i raise as a future request for this option is it possible for future development.
@prabakaran1311 This is what the igxToolbarCustomContent is intended for. We cannot make each little piece of the UI templatable, as this will blow up the number of inputs, directives and templates that different parts of the igx-grid receives, and also the overall size of the package. You can take the template for the hiding toolbar from here:
https://github.com/IgniteUI/igniteui-angular/blob/master/projects/igniteui-angular/src/lib/grids/grid-toolbar.component.html
Then you can define your own custom content with this template as a starting point and you can add more buttons, styles, etc. to the point where the UI suites your application's need.