Obtains the value in the edit control over the current row and column. When the user changes a value in a DataWindow, it is available in the edit control before it is accepted into the column.
string dwcontrol.GetText ( )
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control, DataStore, or child DataWindow |
Returns the value in the edit control over the current row and column in dwcontrol. The value might or might not have been accepted into the row and column. Returns the empty string ("") if no column is currently selected in dwcontrol. If dwcontrol is NULL, the method returns NULL.
The values in the rows and columns of a DataWindow are items in the DataWindow’s buffer. When a user edits a value in a row and column, the item value is transferred as text to the edit control, where the user can change the value. When the user leaves the column or when a script calls AcceptText, the text in the edit control is accepted into the column and becomes the value of the item in the buffer.
You do not need to call GetText in the script for the ItemChanged or ItemError event. To check the value entered in the edit control over the current row and column before allowing it to be accepted into the column, use the data argument.
To obtain the value stored in the DataWindow’s buffer for the row and column, use the GetItem method that corresponds with the datatype of the column.
These statements return the text in the edit control of dw_employee:
string LName
LName = dw_employee.GetText()
Copyright © 2004. Sybase Inc. All rights reserved. |
![]() |