Grid
A sub namespace of UI, exclusive for grid operations
//accessing to ui.grid methods
SW.UI.Grid.{methodName}
addToolbarButtons
Description
This method can be to add buttons in the grid toolbar.
Method(s)
1 function addToolbarButtons(toolbarEvent: any, buttonsList: Button[]): void;
| Parameter | Type | Required | Defaults | Description |
|---|---|---|---|---|
toolbarEvent | any | true | The target dataGrid | |
buttonsList | Button | true | Buttons to add |
Basic Usage
SW.UI.Grid.addToolbarButtons(toolbarEvent, buttonsList);
calculatePercentageSummary
Description
This method can be used to calculate summaries with percentages.
Method(s)
1 function calculatePercentageSummary(options: any, dividend: number[], divisor: number[]): void
| Parameter | Type | Required | Defaults | Description |
|---|---|---|---|---|
options | any | true | Summary options | |
dividend | number[] | true | Array of dividends | |
divisor | number[] | true | Array of divisors |
Basic Usage
SW.UI.Grid.calculatePercentageSummary(options, [1,2,3], [4,5,6]);
Response
delete
Description
This method can be used to delete grid rows.
Method(s)
1 function delete(documentName: string, dataGrid: dxDataGrid, params: { idField?: string } = {}): void
| Parameter | Type | Required | Defaults | Description |
|---|---|---|---|---|
documentName | string | true | Document name | |
dataGrid | dxDataGrid | true | Target datagrid | |
idField | string | false | Field to delete |
Basic Usage
SW.UI.Grid.delete("company", dataGrid);
expandCollapseRows
Description
This method can be used inside any workspace. To expand or collapse specified Grid rows.
Method(s)
1 function expandCollapseRows(dataGrid: dxDataGrid,
2 params: {
3 expandPriority?: boolean
4 } = {
5 expandPriority: true
6 }
7 ): void
| Parameter | Type | Required | Defaults | Description |
|---|---|---|---|---|
dataGrid | dxDataGrid | true | Target datagrid | |
expandPriority | boolean | false | true | Flag to set if the rows are to expanded or collapsed instead |
Basic Usage
SW.UI.grid.expandCollapseRow(dataGrid.component);
Response
exportToPdf
Description
This method allows the grid to be exported as PDF.