Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
Select Multiple Rows in Ultragrid
posted

Hi

 I have a grid which I need to select multiple rows and process the contents of each rows cells

I have tried looping through the rows in the grid and checking the grid.Rows(i).Activated = true

but this only returns the first Active row in the grid.

Is there another property which distinguishes selected rows from non selected rows ??

Is there a difference between active and selected rows

Thanks

Colm

Parents
No Data
Reply
  • 17259
    Offline posted

    Each row has a property named "Selected".

    Active row is the row that has the input focus, hence there is only one active row. Selected row is a row that was selected by the user or by code and there could be more than one.

    If you want to get all selected rows use grid.Selected.Rows

    If you want to select all rows, don't go over them and set Selected = true because this can be very slow, but use grid.Selected.Rows.AddRange(grid.Rows)

Children