selectAll(fireEvent: Boolean);
fireEvent. Determines whether to fire selection event. If the parameter is set to True the event is fired, otherwise it is not. This parameter is optional, by default it is set to True.
The selectAll method selects the whole table.
To execute the example, the HTML page must contain the TabSheet component named tabSheet (see Example of Creating the TabSheet Component). Select the whole table, next determine type and start coordinate of the current selection, merge all selected cells and add a button that resets this selection:
// Get selection object var objSelection = tabSheet.getSelection(); // Select entire table objSelection.selectAll(); // determine selection type var selectionType = objSelection.getSelectionType(); console.log("Current selection type: " + selectionType); // Determine initial selection coordinate var startCoord = objSelection.getStartCoord(); console.log("Initial selection coordinate: " + startCoord); // Get a range of selected cells var range = objSelection.getRange(); // Merge cells of the range of selected cells objSelection.getTabSheet().merge(range); // Add a button to reset selection var resetSelection = new PP.Ui.Button({ ParentNode: document.body, Id: "resetSelection", ResourceKey: "resetSelection", Content: "Reset selection", Click: function btnOnClick() { objSelection.reset() } });
After executing the example the whole table is selected, a button that resets this selection is added, and all cells in the table are merged:
The browser console shows type and start coordinate of the current selection:
Type of the current selection: Table
Start coordinate of selection: (0, 0)
After clicking the button table selection is reset:
See also: