I have multiple bands in my grid, and every 3 seconds, I update every UltraDataRow behind every UltraGridRow. This normally works fine, except if I am scrolled down far enough that there is empty space after the last visible row. If I am scrolled down that far, on the update, it moves the horizontal scroll bar up to the top. Is there a way to disable this behavior?
Thanks.
-Nick
Hi Nick,
My guess is that this caused by the CurrencyManager in DotNet. When you change the values in the rows of data, something in your code is probably changing the current position of the CurrencyManager and the grid is therefore synching up it's ActiveRow property and scrolling the active row into view.
To avoid this, you can turn off this synchronization by setting SynchWithCurrencyManager on the grid to false.
Can you try something to see if it works in your case? It should be simple enough to just try it out:
Try this approach:
this.ultraGrid1.SuspendLayout(); //your logic here to do the updates this.ultraGrid1.ResumeLayout();
In theory, the updates should happen to your underlying data object during "suspended" mode and the grid will not try to reposition itself. Once you resume the layout updating, maybe it will remain in place.