[]
ReportViewer.Toolbar
Defines the contract for the viewer toolbar.
example
const toolbar = {} as Toolbar;
toolbar.getDefaultToolbarItems();
▸ addItem<Item>(item): void
Adds a toolbar item.
example
const toolbar = {} as Toolbar;
toolbar.addItem({ key: 'print' } as ToolbarControl);
| Name | Type |
|---|---|
Item |
extends Without<ToolbarItemButton, ToolbarItemDropdown> & { enabled?: boolean ; icon?: Icon ; iconCssClass?: string ; key: string ; text?: string ; title?: string ; action?: (curr?: ToolbarItemBase<T>) => void | Partial<ToolbarItemBase<T>> ; onUpdate?: (args: ChangedEventArgs, curr: ToolbarItemBase<T>) => void | Partial<ToolbarItemBase<T>> } & { items: DropdownItem[] ; selectedKey?: string } | Without<ToolbarItemDropdown, ToolbarItemButton> & { enabled?: boolean ; icon?: Icon ; iconCssClass?: string ; key: string ; text?: string ; title?: string ; action?: (curr?: ToolbarItemBase<T>) => void | Partial<ToolbarItemBase<T>> ; onUpdate?: (args: ChangedEventArgs, curr: ToolbarItemBase<T>) => void | Partial<ToolbarItemBase<T>> } & { checked?: boolean } = Without<ToolbarItemButton, ToolbarItemDropdown> & { enabled?: boolean ; icon?: Icon ; iconCssClass?: string ; key: string ; text?: string ; title?: string ; action?: (curr?: ToolbarItemBase<T>) => void | Partial<ToolbarItemBase<T>> ; onUpdate?: (args: ChangedEventArgs, curr: ToolbarItemBase<T>) => void | Partial<ToolbarItemBase<T>> } & { items: DropdownItem[] ; selectedKey?: string } | Without<ToolbarItemDropdown, ToolbarItemButton> & { enabled?: boolean ; icon?: Icon ; iconCssClass?: string ; key: string ; text?: string ; title?: string ; action?: (curr?: ToolbarItemBase<T>) => void | Partial<ToolbarItemBase<T>> ; onUpdate?: (args: ChangedEventArgs, curr: ToolbarItemBase<T>) => void | Partial<ToolbarItemBase<T>> } & { checked?: boolean } |
| Name | Type | Description |
|---|---|---|
item |
Item |
The toolbar item to add. |
void
▸ getDefaultToolbarItems(groupName?): string[]
Gets the default toolbar items.
example
const toolbar = {} as Toolbar;
const items = toolbar.getDefaultToolbarItems();
| Name | Type | Description |
|---|---|---|
groupName? |
string |
The optional group name to filter items. |
string[]
The list of toolbar item keys.
▸ removeItem(key): void
Removes a toolbar item.
example
const toolbar = {} as Toolbar;
toolbar.removeItem('print');
| Name | Type | Description |
|---|---|---|
key |
string |
The toolbar item key. |
void
▸ updateItem<Item>(key, itemUpdate?): void
Updates a toolbar item.
example
const toolbar = {} as Toolbar;
toolbar.updateItem('print', { visible: false });
| Name | Type |
|---|---|
Item |
extends Without<ToolbarItemButton, ToolbarItemDropdown> & { enabled?: boolean ; icon?: Icon ; iconCssClass?: string ; key: string ; text?: string ; title?: string ; action?: (curr?: ToolbarItemBase<T>) => void | Partial<ToolbarItemBase<T>> ; onUpdate?: (args: ChangedEventArgs, curr: ToolbarItemBase<T>) => void | Partial<ToolbarItemBase<T>> } & { items: DropdownItem[] ; selectedKey?: string } | Without<ToolbarItemDropdown, ToolbarItemButton> & { enabled?: boolean ; icon?: Icon ; iconCssClass?: string ; key: string ; text?: string ; title?: string ; action?: (curr?: ToolbarItemBase<T>) => void | Partial<ToolbarItemBase<T>> ; onUpdate?: (args: ChangedEventArgs, curr: ToolbarItemBase<T>) => void | Partial<ToolbarItemBase<T>> } & { checked?: boolean } = Without<ToolbarItemButton, ToolbarItemDropdown> & { enabled?: boolean ; icon?: Icon ; iconCssClass?: string ; key: string ; text?: string ; title?: string ; action?: (curr?: ToolbarItemBase<T>) => void | Partial<ToolbarItemBase<T>> ; onUpdate?: (args: ChangedEventArgs, curr: ToolbarItemBase<T>) => void | Partial<ToolbarItemBase<T>> } & { items: DropdownItem[] ; selectedKey?: string } | Without<ToolbarItemDropdown, ToolbarItemButton> & { enabled?: boolean ; icon?: Icon ; iconCssClass?: string ; key: string ; text?: string ; title?: string ; action?: (curr?: ToolbarItemBase<T>) => void | Partial<ToolbarItemBase<T>> ; onUpdate?: (args: ChangedEventArgs, curr: ToolbarItemBase<T>) => void | Partial<ToolbarItemBase<T>> } & { checked?: boolean } |
| Name | Type | Description |
|---|---|---|
key |
string |
The toolbar item key. |
itemUpdate? |
Partial<Item> |
The toolbar item update payload. |
void
▸ updateLayout(layout): void
Updates the toolbar layout for different view modes.
example
const toolbar = {} as Toolbar;
toolbar.updateLayout({ default: ['print', 'search'] });
| Name | Type | Description |
|---|---|---|
layout |
ToolbarLayout |
The layout descriptor for toolbar items. |
void