User (Old forums)MemberMay 29, 2007 at 8:31 pmPost count: 23064
I’m having a few problems adding a new record.
I have a custom collection that implements IBindingList. I have overridden AddNewCore() and set AllowNew=true.
when I start to edit the first (maybe any?) cell in the insertion row I get this exception;
“An attempt was made to add a new data item to a source that does not support insertion”
What more do I need to do to allow insertion?
Imported from legacy forums. Posted by Jack (had 4619 views)Xceed SupportMemberMay 30, 2007 at 8:45 amPost count: 5658
Can you give us more context regarding your particular problem?
XAML/C#/VB code used to initialize the DataGridControl/DataSource
Imported from legacy forums. Posted by Marcus [Xceed] (had 248 views)User (Old forums)MemberMay 30, 2007 at 8:58 amPost count: 23064
MyCollection is a CSLA object that implements several interfaces, including; IBindingList, IList, ICollection, IEnumerable.
OnLoad of my user control I run this code;
DataGridCollectionView temp = new DataGridCollectionView(MyCollection);
grid.ItemsSource = temp;
OnLoad also executes;
private void ResetGrid(bool showInsertionRow, bool showGroupByControl)
private void AdjustHeadersFooters(bool showInsertionRow, bool showGroupByControl)
from your DataBinding sample.
I’ve put breakpoints in the AddNew, AddNewCore and the getter for AllowNew, but these breakpoints are not hit before the exception occurs.
If you want fuller code samples, please let me know.
Imported from legacy forums. Posted by Jack (had 335 views)User (Old forums)MemberMay 30, 2007 at 9:01 amPost count: 23064
I’ve also just started to try and capture these events;
but they don’t appear to fire at all, but I’ll keep looking into it in case I’ve made a mistake somewhere.
Imported from legacy forums. Posted by Jack (had 388 views)Xceed SupportMemberMay 30, 2007 at 9:19 amPost count: 5658
Do you implement INotifyCollectionChanged in your collection? If this is the case, only this interface is taken and we ignore IBindingList—resulting in the problems you are experiencing. This issue has been noted although I cannot provide you with a timeframe as to when it will be corrected.
Imported from legacy forums. Posted by Jenny [Xceed] (had 328 views)User (Old forums)MemberMay 30, 2007 at 10:33 amPost count: 23064
No, they don’t.
Here’s a long list, but this type of CSLA collection implements;
ICloneable, IBindingList, IList, ICollection, IEnumerable, ICancelAddNew, IRaiseItemChangedEvents
um… i just noticed that this particular collection implements INotifyPropertyChanged. By this time tomorrow I’ll have tried it with a collection that does not.
Imported from legacy forums. Posted by Jack (had 302 views)User (Old forums)MemberNovember 13, 2007 at 9:30 amPost count: 23064
This was added in the following release, you can download the latest package <a href=”http://download3.xceedsoft.com/Packages/3.2.7559.11410/XceedComponents.exe”>here </a>
Imported from legacy forums. Posted by Matt (had 5549 views)
- You must be logged in to reply to this topic.