TabSheetMeasures.getVisibleColIndexes

Syntax

getVisibleColIndexes();

Description

The getVisibleColIndexes method returns array of indexes for visible table columns.

Comments

This method returns an array of the Number type values.

Example

To execute the example, the HTML page must contain the TabSheet component named tabSheet (see Example of Creating the TabSheet Component). Hide the first row and column in the table. Then determine the number of visible columns, their indexes and total width, and find the number, indexes and total height for rows. Also, get the number of cells visible by default:

// Get table dimensions
var measures = tabSheet.getMeasures();
// Hide the first row and column
measures.addHiddenRow(0);
measures.addHiddenColumn(0);
// Refresh table
tabSheet.rerender();
// Get size of visible table area
var sizes = measures.getVisibleTableSize();
// Get information about table columns
console.log("Column data:");
console.log("  Number of visible columns: " + measures.getVisibleColumnsCount());
console.log("  Indexes of visible columns: " + measures.getVisibleColIndexes());
console.log("  Total width of visible columns: " + sizes.colWidth);
// Get information about table rows
console.log("Row data:");
console.log("  Number of visible rows: " + measures.getVisibleRowsCount());
console.log("  Indexes of visible rows: " + measures.getVisibleRowIndexes());
console.log("  Total height of visible rows: " + sizes.rowHeight);
console.log("Number of visible cells by default: " + measures.getVisibleDefaultCellsCount());

After executing the example the first table row and column are hidden:

The browser console shows the number of visible table columns, their indexes and total width. Number, indexes and total height are found for visible rows. Also, the console shows the number of cells visible by default:

Column data:

  Number of visible columns: 4

  Indexes of visible columns: 1,2,3,4,5

  Total width of visible columns: 433

Row data:

  Number of visible rows: 4

  Indexes of visible rows: 1,2,3,4,5

  Total height of visible rows: 218

Default number of visible cells: 16

See also:

TabSheetMeasures