Method GetParameterIndexByKey
GetParameterIndexByKey(int, string, int)
Retrieves the value of a cell in the table specified by the primary key and 1-based column position.
object GetParameterIndexByKey(int iID, string key, int iY)
Parameters
iID
intThe ID of the table parameter.
key
stringThe primary key of the row.
iY
intThe 1-based position of the column.
Returns
- object
The value of the cell.
Examples
string myValue = Convert.ToString(protocol.GetParameterIndexByKey(100, "Row 1", 6));
Remarks
- This is a wrapper method for the NotifyProtocol type 122 NT_GET_PARAMETER_INDEX call.
- When a GetParameterIndex call fails because the retrieved cell falls outside the bounds of the table, a null reference is returned and the following message is logged: “NT_GET_PARAMETER_INDEX for [tableID]/[primaryKey]/[columnPosition] failed. 0x80040244”.
- When a GetParameterIndex call fails because the protocol does not contain a table parameter with the provided table ID or the table does not contain a row with the provided primary key, a null reference is returned and the following message is logged: “NT_GET_PARAMETER_INDEX for [tableID]/[primaryKey]/[columnPosition] failed. 0x80040221”.
- GetParameterIndexByKey returns a null reference for uninitialized cells.