I'm having a bit an issue wrapping my head around this for whatever reason.I have an UltraGrid with data bound like so: UltraGrid.SetDataBinding( IBindingList<T>)
Later, I added an UltraCombo (because I like the flexibility of its appearance) but I've run into issues with the ListChanged events not firing properly. I stepped into the UltraGrid_CellChanged event and can see that the value of my grid cell hasn't changed at all, even though its display text has.
My question simply, I suppose - Which object can I bind to a grid column that supports IBindingList and ListChanged events but also has the appearance capabilities of the UltraCombo?
Thanks.
This screen shot isn't really very helpful, because I can't see the whole call stack.
What exactly are you using for your DataSource? Are you using IBindinglist<T> or BindingList<T> or IList<T> or List<T>. Are you using your own custom class derived from one of these classes?
Just to be clear... the grid doesn't fire any ListChanged notifications. The grid updates the DataSource and the data source should be calling these methods. The grid just listens to them.
So if your data source isn't firing ListChanged notifications, then it seems like there is a problem with your data source.The grid works just fine with BindingList<T>, DataSets, DataTable, and UltraDataSource. So if you are creating your own custom data source class and implementing an interface and something isn't working right, it's probably because your implementation is incorrect or incomplete.
The error message you are getting here indicates that the DataSource you are binding to is an IList and not an IBindingList. IList doesn't support adding new rows of data, so it's not a good choice for a data source. IBindingList is much more robust and does support adding new rows of data, but there may be other limitations. For example, if you are using BindingList<T> and your class (T) does not have a public parameterless constructor, then the BindingList will be unable to add new items to the list, since it cannot know what to pass in to the constructor.
Hello ,
Could you please modify my sample to reproduce this issue in order to be able to look into it and to try to find any solution for you.
I am waiting for your response.
Update: Further testing indicates ListChanged events are not actually thrown, and thus I believe this is the root of my problem.
Sure thing
.
If you are binding to a BindingList<T> then you should never see an exception like that, since the BindingList obviously does support IBindingList.
Can you post the call stack of the exception?