F_GET_ALL_SELECTED_ROW

// Function Name : f_get_all_selected_row
// Argument Name : adw_control, Arg Type : Datawindow, Pass By : Value
//                            al_row[], Arg Type : Long, Pass By : Reference
// Return Type :       Integer
// Purpose: Returns the selected rows of a DataWindow into an array
//
// Scope: public
//
// Description : adw_control    the DataWindow control that has rows selected
//                   al_row[]          an array of type long passed by reference that will contain
//                                        the row numbers of the selected rows in the DataWindow
//
// Returns: long        the number of selected rows in the DataWindow

long    ll_row
long    ll_selected_count
long    ll_index = 1

ll_row = adw_control.GetSelectedRow (0)

If ll_row = 0 Then
    // If no rows are selected, return zero
    Return 0
Else
    // Loop through the DataWindow rows and add each row number that is selected to the array.
    Do
        al_row[ll_index] = ll_row
        ll_index++
        ll_row = adw_control.GetSelectedRow (ll_row)
    Loop while ll_row > 0
   
    Return ll_index - 1
End If

0 comments:

Post a Comment