getIndex() |
It returns the index of the selected row that is visually highlighted. It returns '-1', if the row selected does not have any data.
Syntax
Script | iIndex = tableId.getIndex() |
Remarks
In earlier versions of the XForms, the index property was used to retrieve the position of the selected row. This has been deprecated in the current version. It is recommended that the getIndex() method be used instead of index.8
Return Value
Returns an integer that denotes the index of the selected row.
Example
The following sample code demonstrates how the method can be used.
//get the row number of the table var index = CostsTable.getIndex(); //set the value to the amount column in the proper row amountID[index].setValue(pric.text*qty.text);