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
185
Ultrawingrid - load next row problem.
posted

Hi all,

 I'm very very new to all this so in the hope I don't sound like a crazed old woman let me try and explain what I need help with.

My application is written in vb,I have a ultragrid loaded with accno and accname, etc, when the user make the row active, the wrest of the accounts details are displayed in fields below the grid.  When the user has "worked" the account and saved, the account falls of the grid and the next row is automatically loaded.  This I have done using the grid index, the best way? I don't know but it works for now.  However, when the user drags the column headers to change the view to the grouping view, of course it doesn't work.  I have been going arround in circles trying to find out how I reference where the user is in the grid and what would be the next row to load.  Can you help me 1 with how I even know the grid view has changed to a grouping view and then how I find out where in the grid the user is.

Hope I don't sound too confused???

 

Trudy

  • 469350
    Verified Answer
    Offline posted

     Hi Trudy,

        I't hard to answer your question without knowing how your application is working now. But I can give you a basic run-down of how grouping works and maybe that will help.

        Basically, there are two types or rows at work here. There are the regular data rows in the grid and then there are the groupby rows.

        The grid.Rows collection will normally return a collection of data rows. Once you group the grid, a hierarchy is created. The root-level rows become a collection of GroupByRows and then the child of those rows are the data rows.

        There are properties on the rows collection to tell you if it's a collection of GroupByRows or not. I think the property is something like grid.Rows.IsGroupByRowsCollection.

        On the individual row, there is a property called IsGroupByRow.

        If a row is a GroupByRow, you can cast it into an UltraGridGroupByRow to access the group-specific properties of the row, such as Vaule, Descrption, and ChildRows. The ChildRows may be data rows or they may be more GroupByRows if you have more than one column grouped. 

        Also, on the Rows collection, there are methods like grid.Rows.GetAllFilteredinNonGroupByRows which will return all of the data rows in a single list.