getCell();
The getCell method gets the cell that contains table basic editor.
This method returns a PP.Ui.TabSheetCell value.
To execute the example, the HTML page must contain the TabSheet component named tabSheet (see Example of Creating the TabSheet Component). Open editor for the cell under coordinates (0, 1), get formatted text of this cell, its coordinates, IDs for the table and text box of this editor:
// Start editing the cell with coordinates (1, 1); tabSheet.edit(0, 1); // Get the current active cell editor var editor = tabSheet.getCurrentCellEditor(); // Get the cell containing the editor var editedCell = editor.getCell(); // Output information about the obtained cell console.log("Formatted text of the edited cell: " + editedCell.CellData.FormattedText); // Get coordinates of the cell containing the editor var coord = editor.getCoord(); console.log("Cell coordinates: (" + coord.rowIndex + ", " + coord.colIndex + ")") // Get table var ts = editor.getTabSheet(); console.log("Table identifier: " + ts.getId()); // Get text box of the table editor var textBox = editor.getTextBox(); console.log("Text box identifier: " + textBox.getId());
After executing the example the editor opens for the cell under coordinates (0, 1):
The browser console shows formatted text of this cell, its coordinates, IDs of the table and text box of this editor:
Formatted text of the edited cell: 3912
Cell coordinates: (0, 1)
Table ID: tabSheet1
Text box ID: 571
See also: