GetItem method (DataWindows)
Description
Gets the value of an item for the specified row and column
in a Web DataWindow client control. Use one of the datatype-specific
methods such as GetItemString for other types
of DataWindow control. GetItem returns the value
available in the data available to the client. This is equivalent
to the primary buffer in other environments.
Controls
|
DataWindow type |
Method applies to |
|---|---|
|
Web |
Client control |
Syntax
[Web DataWindow client control]
|
1 |
returnvalue <span>dwcontrol</span>.<span>GetItem</span> (number <span>row</span>, number <span>column</span> ) |
|
1 |
returnvalue <span>dwcontrol</span>.<span>GetItem</span> (number <span>row</span>, string <span>column</span> ) |
|
Argument |
Description |
|---|---|
|
dwcontrol |
A reference to a DataWindow control. |
|
row |
A value identifying the row location |
|
column |
The column location of the data. Column can To get the contents of a computed field, specify the name |
Return Values
Returns the value in the specified row and column. The datatype
of the returned data corresponds to the datatype of the column.
Returns null if the column value is null. Returns the empty string
(“”) if an error occurs.
If any argument value is null, the method returns null.
Usage
Use GetItem to get data that has been accepted
by the DataWindow. In a script for the ItemChanged or ItemError
event, you can use the newValue argument to find out what the user
entered before the data is accepted.
Examples
This statement sets LName to the value for row 3
of the emp_name column in the DataWindow dw_employee:
|
1 |
var LName = dw_employee.<span>GetItem</span>(3, "emp_name"); |