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
470
Next visible row?
posted

Hallo,

my grid display rows as following:

  • some rows are filtered out
  • the rows are sorted
  • the rows are grouped

The grid is bound to a BindingSource.

How can I set the active row to the next visible row when a new row is filtered out or someone remove a record from the BindingSource?

I tried:

UltraGridRow row = grid.ActiveRow; // this is currently the FilteredOutRow
grid.ActiveRow = row.GetRowAtVisibleIndexOffset(row, 0);

but it doesn't work well.

The next problem is, when I delete a record direct from the datasource. The active row is automaticly reset.

I hope someone have an idee.

Michael

  • 469350
    Offline posted

    Hi Michael,

    systema_1099 said:
    but it doesn't work well.

     

    What doesn't work well about it? What's the problem?

    systema_1099 said:
    The next problem is, when I delete a record direct from the datasource. The active row is automaticly reset.

    My guess is that the CurrencyManager is doing this.  In which case, there's really nothing the grid can do about it. You might want to turn off SynchWithCurrencyManager on the grid. This will make it so the grid does not synchronize it's active row with the current position of the BindingManager.