Provides a reference to the Column Hiding button.
const hidingButton = this.grid.toolbar.columnHidingButton;
Provides a reference to the IgxDropDownComponent
of the Column Hiding UI.
const dropdownHiding = this.grid.toolbar.columnHidingDropdown;
Provides a reference to the IgxColumnHidingComponent
.
const hidingUI = this.grid.toolbar.columnHidingUI;
Provides a reference to the Column Pinning button.
const pinningButton = this.grid.toolbar.columnPinningButton;
Provides a reference to the IgxDropDownComponent
of the Column Pinning UI.
const dropdownPinning = this.grid.toolbar.columnPinningDropdown;
Provides a reference to the IgxColumnPinningComponent
.
const pinningUI = this.grid.toolbar.columnPinningDropdown;
Provides a reference to the Export button.
const exportBtn = this.grid.toolbar.exportButton;
Provides a reference to the IgxDropDownComponent
of the Export button.
const exportDropdown = this.grid.toolbar.exportDropdown;
Returns the context
object which represents the template context
binding into the
toolbar custom container
by providing references to the parent IgxGird and the toolbar itself.
const context = this.igxGrid.toolbar.context;
Gets the height for the IgxGridToolbarComponent
's drop down panels.
const dropdownHeight = this.grid.toolbar.defaultDropDownsMaxHeight;
Returns the theme of the component.
The default theme is comfortable
.
Available options are comfortable
, cosy
, compact
.
let componentTheme = this.component.displayDensity;
Sets the theme of the component.
Gets the default text shown in the filtering box.
const filterPrompt = this.grid.toolbar.filterColumnsPrompt;
Sets the default text shown in the filtering box.
this.grid.toolbar.filterColumnsPrompt('Filter columns ...');
Returns a reference to the IgxGridComponent
component, hosting the IgxGridToolbarComponent
.
const grid = this.igxGrid1.toolbar.grid;
Returns the theme of the IgxGridToolbarComponent
.
const toolbarTheme = this.grid.toolbar.hostClass;
Returns how many columns are pinned.
const pinnedCount = this.igxGrid1.toolbar.pinnedColumnsCount;
Returns whether the IgxGridComponent
renders an export button.
const exportButton = this.igxGrid1.toolbar.shouldShowExportButton;
Returns whether the IgxGridComponent
renders an CSV export button.
const exportCSVButton = this.igxGrid1.toolbar.shouldShowExportCsvButton;
Returns whether the IgxGridComponent
renders an Excel export button.
const exportExcelButton = this.igxGrid1.toolbar.shouldShowExportExcelButton;
Toggles the export button's dropdown menu.
this.igxGrid1.toolbar.exportClicked();
Exports the grid to CSV.
this.igxGrid1.toolbar.exportToCsvClicked();
Exports the grid to excel.
this.igxGrid1.toolbar.exportToExcelClicked();
Returns the text of the CSV export button of the IgxGridToolbarComponent
.
const toolbarCSVText = this.igxGrid1.toolbar.getExportCsvText();
Returns the text of the Excel export button of the IgxGridToolbarComponent
.
const toolbarExcelText = this.igxGrid1.toolbar.getExportExcelText();
Returns the text of the export button of the IgxGridToolbarComponent
.
const toolbarExportText = this.igxGrid1.toolbar.getTitle();
Returns the title of IgxGridToolbarComponent
.
const toolbarTitle = this.igxGrid1.toolbar.getTitle();
Toggles the Column Hiding UI.
this.grid1.toolbar.toggleColumnHidingUI();
Toggles the Column Pinning UI.
this.grid1.toolbar.toggleColumnPinningUI();
This class encapsulates the Toolbar's logic and is internally used by the
IgxGridComponent
,IgxTreeGridComponent
andIgxHierarchicalGridComponent
.