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
385
ActiveRow changs unexpectedly
posted

Hi All

I'm using UltraGrid v7.3 and using dataset as the datasource, there are 3 bands in my grid, they are like below:

A
   B
A2
A3
   B2
   B3
       C2
       C3
       C4
       C5
A4
A5

.

First my active row are on the C's band. When I programmatically changes cell value on C4 or C5, The active all row changes to C2 ( the first row). In the debug mode, I set a breakpoint on the grid's AfterRowActive method, I cann't see any of my code in the calling stack, and I can see an SetActiveRow method in the Infragistics code.

Infragistics.Win.UltraWinGrid.UltraGrid.FireEvent
Infragistics.Win.UltraWinGrid.UltraGrid.OnActiveRowChange
Infragistics.Win.UltraWinGrid.UltraGridBase.SetActiveRow
Infragistics.Win.UltraWinGrid.UltraGrid.EnsureTempActiveRowAssigned
Infragistics.Win.UltraWinGrid.UltraGridBase.PaintTimer_Tick
System.Windows.Forms.dll!System.Windows.Forms.Timer.OnTick

Why is this SetActiveRow is called?  I'm guessing the C-band's Binding manager has been reset, it's position has been changed to 0, so the active row always change to the first row.  Is there a way of getting the binding manager of the lower band?

 

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    By default, the grid synchronizes the ActiveRow with the current Position of the DotNet CurrencyManager/BindingManager. The call stack you have here seems to indicate that the grid is responding to a change in the CurrencyManager's position. So something in your code must be causing the CurrencyManager to change position.

    If you don't want this synchronization to occur, you could set grid.SyncWithCurrencyManager to false.

Children