Type | Name | Description | Notes |
Boolean | allowColumnMove | This property is true if the end user can change the order of the columns. | |
Boolean | allowColumnResize | This property is true if the end user can change the size of the columns. | |
Boolean | allowRowMove | This property is true if the end user can change the order of the rows. | |
Boolean | allowRowResize | This property is true if the end user can change the size of the rows. | |
Boolean | alwaysShowSelection | This property is true if the selection of the table gadget is always highlighted even if the table gadget has lost the focus. | |
IliValueTableFittingMode | autoFit | Contains the auto-fitting mode. This mode determines how the table gadget recalculates its column widths when the gadget itself is resized. The possible string values are:
IliFitNone
IliFitProportional
IliFitLast
| |
Boolean | autoFittingPullDown | The value of this property is assigned to the the autoFitting property of any table combo box contained in the table gadget. See the description of IliTableComboBox::autoFitting for more information. Initially, this property is false. | |
Boolean | boundToDataSource | This property is true if the table gadget is bound to its data source. In this situation, the current row of the table gadget is synchronized with the current row of the data source. | |
Color | cellBackground | Contains the default background color used to draw the cells. See the GetCellPalette callback for how to change the background on a cell by cell basis. | |
Font | cellFont | Contains the default font used to draw the cells. See the GetCellPalette callback for how to change the font on a cell by cell basis. | |
Color | cellForeground | Contains the default foreground color used to draw the cells. See the GetCellPalette callback for how to change the foreground on a cell by cell basis. | |
IliCellPaletteStruct | cellPaletteStruct | Contains the description of the cell that is currently being drawn, along with other useful information. This property should be only used during the execution of the GetCellPalette table gadget callback. | read-only |
Boolean | columnGeometryLocal | This property is true if the table gadget manages column width, visibility, and ordering independently of the underlying table. Otherwise, column geometry is synchronized with the underlying table. | |
Int | columnsCount | Contains the number of columns in the underlying table. | read-only |
Boolean | confirmDeletes | This property is true if the user is prompted for a confirmation before deleting a row. | |
Int | currentColumn | Contains the index of the current column or -1 if there is no current column. | read-only |
Int | currentRow | Contains the index of the current row or -1 if there is no current row. | read-only |
IliDataSource | dataSource | Contains the data source object. This property cannot be written to if the dataSourceName property is not empty. In other words, the data source can be specified either literally through the dataSource property or by name through the dataSourceName property, but not both. | |
String | dataSourceName | Contains the data source name. | |
Boolean | deleteKey | This property is true if the user can use the delete key to delete the current row. | |
Int | deletedRow | Contains the row position that is to be deleted. | read-only |
Int | fetchedRow | Contains the row position that is fetched. | read-only |
Int | firstColumn | Contains the position of the first column shown. When the value of this property is changed, the table gadget is scrolled horizontally so that the first visible column (not counting any fixed columns) will become the one whose index is contained in this property. | |
Int | firstRow | Contains the position of the first row shown. When the value of this property is changed, the table gadget is scrolled vertically so that the first visible row will become the one whose index is contained in this property. | |
Int | fixedColumns | Contains the number of columns that do not scroll. These are the left-most columns. | |
Int | headerHeight | Contains the height, in pixels, of the column headers. | |
IliValueShowMode | horizontalScroll | Contains the show mode of the horizontal scroll bar. The possible values are the following strings:
IliShowNever
IliShowAsNeeded
IliShowAlways
| |
Boolean | inputModified | Contains true if the table gadget's current row is being modified awaiting validation. | read-only |
Int | markerWidth | Contains the width, in pixels, of the row markers. | |
Boolean | multiSelectionEnabled | This property is true if the multiselection is enabled. | |
Boolean | readOnly | This property is true if the gadget is read only. | |
Boolean | refreshKey | This property is true if the user can call the IliTable::select member function on the underlying table with the refresh key (F9). | |
Int | rowHeight | Contains the height, in pixels, of the rows in the table gadget. Note that all rows have the same height. | |
Boolean | rowSelectEnabled | This property is true if the row selection is enabled. If it is enabled, the user cannot select individual cells. Instead, when the cell is selected, the whole row containing the cell is selected. | |
IliTableSelection | selection | Contains the description of the selection. | |
Boolean | showCellEditor | This property is true if the cell editor is shown in the selected cell when the cell is read only. | |
Boolean | showGrid | This property is true if the grid is shown. | |
Boolean | showHeaders | This property is true if the headers are shown. | |
Boolean | showInsertRow | This property is true if the inserted row is shown. Note that if the table gadget is bound to its data source and this property is false, the data source's insertEnabled should also be false . | |
Boolean | showMarkers | This property is true if the markers are shown. | |
Boolean | sortEnabled | This property is true if the end user can sort rows by clicking on the column headers. | |
IliTable | table | Contains the underlying table of the table gadget. If the dataSource property is not null , the value of this property is the same as that of the data source. If the dataSource property is null , a table can be explicitly assigned to this property. | |
String | tablePropertyManagerName | Contains the name of the table property manager being used or null if the default property manager is used. | |
Boolean | useRelief | This property is true if the table gadget is drawn with a relief border. | |
Boolean | useTableProperties | Contains true if the table gadget is sensitive to table properties. Initially, this property is false . | |
IliValueShowMode | verticalScroll | Contains the show mode of the vertical scroll bar. The possible values are the following strings:
IliShowNever
IliShowAsNeeded
IliShowAlways
| |
Void | addError(String message) | Forwards an application error message to all the error sinks that have been added with the addErrorSink function. | |
Void | addErrorMessage(IliErrorMessage message) | Forwards an application error message to all the error sinks that have been added with the addErrorSink function. | |
Void | addErrorSink(Object sink) | Adds an error sink to the table gadget. When an error occurs, it will be forwarded to this error sink.
The sink parameter can be one of the following:
| |
Void | cancel() | Cancels any user input awaiting validation. | |
Void | dontDeleteRow() | Called from the PrepareDeleteRow callback. This function stops the deletion of the row whose position is given by the deletedRow property. The addError method should be called to provide the user with a descriptive error message. | |
Void | dontValidateCell() | Called from the ValidateCell callback. This function stops the validation of the current cell from proceeding. The addError method should be called to provide the user with a descriptive error message. | |
Void | dontValidateRow() | Called from either the ValidateRow , PrepareUpdate or PrepareInsert callback. This function stops the row validation from proceeding. The addError method should be called to provide the user with a descriptive error message. | |
IliTableGadgetColumn | getColumn(String colname) | Returns the description of the column named colname . Note that the columns become properties of the table gadget so that the following are equivalent:
tg.getColumn("NAME")
tg.NAME
| |
IliTableGadgetColumn | getColumnAt(Int colno) | Returns the description of the column positioned at colno . | |
Boolean | isOnInsertRow() | Returns true if the current row is the insert row. | |
Callback | removeErrorSink(Object sink) | Removes an error sink. | |
Void | reportErrors(IliErrorList list) | Reports the errors that are in the error list. | |
Boolean | selectAll() | Attempts to select all rows and all columns and returns true if successful. | |
Boolean | selectCell(Int rowno, Int colno) | Attempts to select the cell positioned at row rowno and at column colno and returns true if successful. | |
Boolean | selectColumn(Int colno) | Attempts to select the column positioned at colno and returns true if successful. | |
Boolean | selectNone() | Attempts to deselect the current selection and returns true if successful. | |
Boolean | selectRow(Int rowno) | Attempts to select the row positioned at rowno and returns true if successful. | |
Void | usePictureAt(Int colno) | Sets the editor used for the column positioned at colno to an IliDbPicture gadget. This is useful if the column has a String type and if the values in the column designate image files (those found in the Rogue Wave Views path). | |
Void | useToggleAt(Int colno) | Sets the editor used for the column positioned at colno to an IliDbToggle gadget. This is useful if the column has a Boolean type. | |
Boolean | validate() | Validates the current row. Returns true if successful. A dialog box displays an error message in case of failure. | |
Boolean | validateSilently() | Validates the current row. Returns true if successful. In case of failure, no error message is displayed. | |
Callback | CancelEdits | This callback is only available if boundToDataSource is false . Called just after the edits in the current row have been cancelled. | |
Callback | DeleteRow | Called just before a row in the underlying table is deleted. The index of the row that is to be deleted can be obtained by looking at the deletedRow property. | |
Callback | DoubleClick | Called when the user double-clicks on the table gadget. | |
Callback | EnterCell | Called just after a new cell is entered. | |
Callback | EnterInsertMode | Only available if boundToDataSource is false . Called just after the current row buffer becomes modified when the current row is the insert row. | |
Callback | EnterRow | Called just after a new row is entered. | |
Callback | EnterUpdateMode | Only available if boundToDataSource is false . Called just after the current row buffer becomes modified when the current row is not the insert row. | |
Callback | FetchRow | Called just after a new row has been retrieved from a remote database and cached in the underlying table. The index of the row that has just been fetched can be obtained by looking at the fetchedRow property.
Here is an example of a FetchRow callback:
var counter = 0;
function OnFetchRow(tg) {
var column = tg.COUNTER.tableColumn;
column.setInCache(tg.fetchedRow,
++counter);
}
Note how it uses the setInCache method of class IliTableColumn to store a value in the local row cache of the table object. | |
Callback | GetCellPalette | Called when the text and fill palettes of a cell are required, either to draw the cell or to configure the cell editor. The cell for which the palettes are required is described, along with other useful information, in the object obtained by looking at the cellPaletteStruct property. | |
Callback | PrepareDeleteRow | This callback is only available if boundToDataSource is false . Called when the user attempts to delete a row through this table gadget. The index of the row that is to be deleted can be obtained by looking at the deletedRow property.
The row deletion can be prevented by calling the dontDeleteRow method. In addition, the addErrorMessage member function may be called to describe the reason of the failure.
Here is an example of a PrepareDeleteRow callback:
function OnPrepareDeleteRow(tg) {
if (tg.deletedRow == 0) {
tg.dontDeleteRow();
tg.addError("Leaf node cannot be deleted.");
}
}
| |
Callback | PrepareInsert | Only available if boundToDataSource is false . Called when an attempt is made to validate the current row when the current row is the insert row. This callback is called in addition to the ValidateRow callback. The row validation can be prevented by calling the dontValidateRow method. In this case, the addErrorMessage method should also be called to provide an error message to the user. Alternatively, it is possible to change some of the values in the current row before it is inserted in the underlying table. | |
Callback | PrepareUpdate | Only available if boundToDataSource is false . Called when an attempt is made to validate the current row when the current row is not the insert row. This callback is called in addition to the ValidateRow callback. The row validation can be prevented by calling the dontValidateRow method. In this case, the addErrorMessage method should also be called to provide an error message to the user. Alternatively, it is possible to change some of the values in the current row before it is updated in the underlying table. | |
Callback | QuitCell | Called just before the selection moves out of a cell. | |
Callback | QuitInsertMode | This callback is only available if boundToDataSource is false . Called just after the current row has been successfully validated when the current row is the insert row. | |
Callback | QuitRow | Called just before the selection moves out of a row. | |
Callback | QuitUpdateMode | Only available if boundToDataSource is false . Called just after the current row has been successfully validated when the current is not the insert row. | |
Callback | SelectionChange | Called just after the selection has changed (whatever the change). | |
Callback | ValidateCell | Called when an attempt is made to move the selection out of a cell. The cell validation can be prevented by calling the dontValidateCell method. In this case, the addErrorMessage method should also be called to provide an error message to the user. | |
Callback | ValidateRow | Only available if boundToDataSource is false . Called when an attempt is made to validate the current row. The row validation can be prevented by calling the dontValidateRow method. In this case, the addErrorMessage method should also be called to provide an error message to the user. Alternatively, it is possible to change some of the values in the current row before it is transmitted to the underlying table. This callback is called when an existing row is being updated or when a new row is being inserted.
Here is an example of a ValidateRow callback:
function OnValidateRow(tg) {
var capacity = tg.CAPACITY.value;
var volume = tg.VOLUME.value;
if (volume > capacity) {
tg.dontValidateRow();
tg.addError("Volume must be less than Capacity");
}
else {
tg.LASTMODIF.value = new Date();
}
}
| |