Having a bunch of issues with InitializeRow not be fired at appropriate times that have been logged with the dev team already. But this one is so basic I need some quick guidance:
I bind my UltraGrid to a BindingSource which in turn is bound to a datasource of type BindingList<T> (of objects that implement INotifyPropertyChanged).
When I raise a PropertyChanged(null / empty) from the objects I expect to get a ListChangedType.Reset event raised in the BindingSource. And I do. What I do not get is any InitializeRow events called in the grid - I expected that I would. I used to in older versions (using .net2 with v7.3).Any pointers? Like, why does the grid not fire initializerows so when it gets a reset event from the list?
Thanks,John
Hello Bhavesh and Krzysztof,
I have updated your cases. Please view the case to find full details about the solution.
When you know you want InitializeRow to re-fire, your best option is to use grid.Rows.Refresh(FireInitializeRow).
Please let me know if you have further quetions in this matter.
I will be happy to assist you with this issue.
This issue appears to be a bug. I have created a case for you to better assist you with this issue going forward. To access the case, simply log into your IG account and click on My Support Activity.
Please let me know if you have further questions in this matter utilizing the case created.
Hi Mike,
I am also using BindingList and on ResetBindings expecting InitlalizeRow to be called for all the rows. This isn't happening.
Bhavesh
Hi Mike
It is BindingList of course. I attached an example.
I use your suggestion for now, but just wondering if this shouldn't be something gird always does, without an extra implementation.
In the example
Update button updates first row (index - 0)
Krzysztof
Hi Krzysztof,
What is m_list in your example? What type is it?
My first reaction is that the InitializeRow event should fire for every row in the grid when the grid gets a reset notification. But since I don't know what kind of data source you are using, I cannot test it to see why it's not working.
If you could post a small sample project demonstrating the issue, that would be a big help in tracking it down.
If you want to just work around the issue, it's very easy. After you call ResetBindings, call grid.Rows.Refresh(FireInitializeRow).