Home Forums WinForms controls Xceed Grid for WinForms Forced Row Change in Databound grid Reply To: Forced Row Change in Databound grid

User (Old forums)
Post count: 23064

Reply To Self:
This is due to the EndInit method on DetailGrid (used even if the grid is not using Master/Detail triggering a resort on the data rows which in turn triggers a method which explicitly does this reset!


in the changes from 2.0.102 and 2.1

“When code executes between GridControl.BeginInit / EndInit, it will keep the new and modified DataRows or Groups from sorting. When EndInit is called, it will trigger a global resorting”

No idea why this change doesn’t

1) have a simple means of disabling said behaviour
2) at least only trigger if a sort has been activated!

It is trivial to achieve this in a test app. just:
a) add a default setup grid to a form.
b) set the DataSource to some IBindingList implementation.
c) add some elements to the IBindingList
d) add a button whose event handler:
d1) calls begin init
d2) alters the state of an element
d3) calls end init

run app, select some row not at the top, hit the button. Hey presto selection goes.

Does no-one else care about this?

[sigh] have raised a support request, hopefully will at least have a workaround, if not it’s adios Xceed.Grid.


Imported from legacy forums. Posted by shuggycouk (had 453 views)