First of all, I am fairly new to .NET and especially to the infragistics controls, so this might be an obvious question, I just haven't stumbled on the answer yet
I have a data grid that is bound to an IList<T>-based class at runtime. The datagrid shows and saves the data correctly. However, when the user tries to add by entering data in the bottom-most row I get an error saying that it can't add a row because the underlying data source doesn't support adding new rows.
my IList<T> does support add, but maybe that is not what the datagrid is looking fo. (The probalby has to be more to it that IList.add() since it needs to know what sort of object to add.)
So how so I make this work?
thanks
I don't think IList<T> supports adding. You may want to try using List<T> instead. Or even BindingList<T> might be better.
I am using a custom data source. Changing to a different data source doesn't solve the problem. The data source supports all of the interfaces that List<T> supports. IList<T>, ICollection<T>, IEnumerator<T> I can probably add a new interface if needed, but I can't simply switch to a difference container.
What interface does the grid use in the add? or what do I need to override to help it perform an add?
The grid deals with one of 2 interfaces: IList or IBindingList. I beleive that IList does not have an Add method, so you would have to use IBindingList.
Didn't know about IBindingList. That should do it Have to implement it though....
thanks a lot.