getFocusedCell();
The getFocusedCell method returns coordinates of focused table cell.
The method returns value of the PP.Ui.TabSheetCoord type.
To execute the example, the HTML page must contain the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component) and with the loaded table in the express report workspace. Before executing this example the express report table looks as it is shown in the page with description of the GridView class.
Set new value for table width and height and then refresh the table. Get coordinates of the currently focused cell, number of rows in the table and current type of table selection:
// Get express report table var grid = expressBox.getDataView().getGridView(); // Set new values of table width and height grid.setWidth(250); grid.setHeight(200); // Refresh table grid.refresh(new PP.Mb.Ui.PropertyChangedEventArgs({ PropertyName: PP.Exp.Ui.ControlType.DataView, TypeUpdateData: PP.Exp.Ui.ViewTypeUpdate.Table })); // Get coordinates of focused cell var focusedCell = grid.getFocusedCell(); console.log("Coordinates of focused cell: [" + focusedCell.rowIndex + ", " + focusedCell.colIndex + "]"); // Get the number of rows in table console.log("Number of rows in table: " + grid.getRowsCount()); // Get the current selection type in table console.log("Current selection type in table: " + grid.getSelectionType());
As the result, table size is changed and scrollbars are shown:
The browser console also displays coordinates of focused cell, number of rows in the table and type of table selection:
Coordinates of focused cell: [6, 1]
Number of table rows: 7
Current selection type: Cell
Hide horizontal and vertical scrollbars:
// Hide horizontal and vertical scrollbars grid.setScroll(PP.Exp.Ui.TableEnum.HScroll, False); grid.setScroll(PP.Exp.Ui.TableEnum.VScroll, False);
Scrollbars are hidden:
See also: