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
785
How to determine the number of bands that are truly bound?
posted

I have a tree grid where I'm binding to a collection with sub-collections.  I have no more than seven levels of sub-collections and therefore should only see seven levels in my tree grid.

How do I tell from the grid the number of true bands that have been bound to via data-binding?  The number of Bands.Count is indicating 100 which appears to be pre-allocated bands.

 

 

  • 469350
    Verified Answer
    Offline posted

    Hi,

    If your data source has a recursive structure, then the only way to determine the number of bands that actually exist is to walk through every row and it's child rows recursively.

    There is really no "total number of bands" defined anywhere, because this number is determined by the data, not the data structure. Even if you get the total number of bands at any given point, it could change in the future if a new row is added or removed.