I know there are several of these questions, but none that I found answer my question. I have a BindingSource with a class object as it's data source. The class object contains a bunch of properties, and a list of items (Csla BusinessListBase<Ts, T>) I have an UltraGrid bound to the 'items' property of the BindingSource.
I can save, update, and delete just fine. If I place a button on the form, on click, I can use 'currentClassObject.Items.AddNew()' to add a new row in the grid. But using the standard template add row does not work. I get 'Data source does not support adding new rows'. Does this make sense? Like, if it really didn't support adding rows, why does 'AddNew' work?
I don't know if Csla BusinessListBase<T> incorporates BindingList<T> or not, but my code works after making my 'private' parameterless contructor 'public'. So thank you!
Hi beardedmogul,
Thank you for posting in our forums!
The collection under your data source must be BindingList<T> and the business object of type T must have explicitly declared parameterless constructor. Check out the attached sample application and let me know if you need further assistance regarding this.