Extends: Object
Implements: Options, Events
A Jx.Grid.Model is the source of data for a Jx.Grid instance. The default implementation of the grid model works with two-dimensional arrays of data and acts as a convenient base class for custom models based on other sources of data.
License
Copyright © 2008, DM Solutions Group Inc.
This file is licensed under an MIT style license
Summary
| Jx.Grid.Model | Extends: Object |
| Options | |
| colHeaderHeight | default 28, the height of the column header row |
| colHeaderHeight | default 28, the height of the column header row |
| rowHeaderWidth | default 28, the width of the row header column. |
| colWidth | default 50, the width of columns |
| rowHeight | default 20, the height of rows |
| columnHeaders | optional column headers, defaults to null |
| Constructor | |
| Jx.Grid.Model | create a new grid model |
| Functions | |
| getColumnCount | This function returns the number of columns of data in the model as an integer value. |
| getColumnHeaderHTML | This function returns an HTML string to be placed in the column header for the given column index. |
| getColumnHeaderHeight | This function returns an integer which is the height of the column header row in pixels. |
| getColumnWidth | This function returns an integer which is the width of the given column in pixels. |
| getRowHeaderHTML | This function returns an HTML string to be placed in the row header for the given row index |
| getRowHeaderWidth | This function returns an integer which is the width of the row header column in pixels. |
| getRowHeight | This function returns an integer which is the height of the given row in pixels. |
| getRowCount | This function returns the number of rows of data in the model as an integer value. |
| getValueAt | This function returns an HTML string which is the text to place in the cell at the given row and column. |
| setColumnWidth | This function is called with a column index and width in pixels when a column is resized. |
| isCellEditable | This function returns a boolean value to indicate if a given cell is editable by the user. |
| setValueAt | This function is called with the row and column of a cell and a new value for the cell. |
| rowSelected | This function is called by the grid to indicate that the user has selected a row by clicking on the row header. |
| columnSelected | This function is called by the grid to indicate that the user has selected a column by clicking on the column header. |
| cellSelected | This function is called by the grid to indicate that the user has selected a cell by clicking on the cell in the grid. |