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
620
Looping through the Parent Rows Only
posted

I have an ultragrid with two bands. Band 0 and Band 1. How to loop only through the parent rows i.e only through the band 0 and find the cell value in that band 0 so that I can compare that value ? Am using the InitializeRow Event.

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    If you are using InitializeRow, then you could check the e.Row.Band and look at the Key or the Index of the band to determine if you are dealing with the Band 0 rows.

    If you want to loop through the grid rows outside of InitializeRow, then you would do something like this:

    foreach (UltraGridRow row in this.ultraGrid1.Rows)

    {

         if (row.Cells[0].Value == theValueIAmLookingFor)

         {

              // do something

         }

    }

Children