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
705
Iterating through the selected rows of an UltraGrid
posted

 

 

 

Hi, how can I iterate through the selected rows of an UltraGrid?

I don´t know how to address each row that is selected to be able to read the content of a specific cell. I have this:

 

For i = 1 To UltraGrid1.Selected.Rows.Count

    pVar =  selected row n# i  .text

    . . .

Next

Thanks!

Parents
  • 469350
    Verified Answer
    Offline posted

    For Each row As UltraGridRow In Me.UltraGrid1.Selected.Rows
                Debug.WriteLine(row.Cells("Column Key").Text)
    Next

     

    or, if you prefer to use an indexer:

            For i As Integer = 1 To Me.UltraGrid1.Selected.Rows.Count
                Debug.WriteLine(Me.UltraGrid1.Selected.Rows(i).Cells("Column Key").Text)
            Next

Reply Children