Highlights or removes highlights from rows in a DataWindow control or DataStore. You can select all rows or a single row. SelectRow does not affect which row is current. It does not select rows in the database.
integer dwcontrol.SelectRow ( long row, boolean select )
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control, DataStore, or child DataWindow. |
row |
A value identifying the row you want to select or deselect. Specify 0 to select or deselect all rows. |
select |
A boolean value that determines whether the row is selected or not selected:
|
Returns 1 if it succeeds and -1 if an error occurs. If any argument’s value is NULL, the method returns NULL. If there is no DataWindow object assigned to the DataWindow control or DataStore, the method returns 1.
If a row is already selected and you specify that it be selected (boolean is TRUE), it remains selected. If a row is not selected and you specify that it not be selected (boolean is FALSE), it remains unselected.
This statement selects the fifteenth row in dw_employee:
dw_employee.SelectRow(15, TRUE)
As the script for a DataWindow’s Clicked event, this example removes highlighting from all rows and then highlights the row the user clicked.
Row is an argument passed to the event script:
This.SelectRow(0, FALSE)
This.SelectRow(row, TRUE)
Copyright © 2004. Sybase Inc. All rights reserved. |
![]() |