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
110
Loop Through Grid
posted

  I am trying to do a loop that goes through every row & executes code.  Any help would be appreciated.  I have never used the infragistics, but our software uses the controls..

Parents
No Data
Reply
  • 469350
    Offline posted

     Hi,

        It's very difficult to answer your question without knowing more about yoru data structure, what you are trying to do, and what features of the grid you are using.

        Usually, looping through rows in the grid is not a very efficient way to do things. If, for example, you want to apply a color to a cell or row based on a value in that row, you would be much better off using the InitializeRow event rather than looping through every row. 

        If you do actually need to loop, then you will want to use the grid's Rows collection. The collection itself contains only the root-level rows. So if you want rows on multiple levels, you will want to use one of the methods on this collection such as GetAllNonGroupByRows, GetFilteredInNonGroupByRows, GetFilteredOutNonGroupByRows, or GetEnumerator. Which one you use depends on many factors. 

Children