I have a XamDataGrid with a DataSource bounded. This data Source looks like this:
BindingList<Directory> directories =new BindingList<Directory>();
Folder f1 = new Folder() { CreationDate = DateTime.Now, Group = "a", Name = "c"}; // and some more folder objects
Directory directory = new Directory() { Folders = new ObservableCollection<Folder>() { f1, // AND SO ON };
I have'grouped' my directories, so i have + signs to go to the Folder objects
My question is, i need to have on each level a AllowAddNew record. With the bool on true on the FieldLayouts i get only the first level off the grid the oppertunity.Not the
Hello,
Instead of ObservableCollection<T> use only BindingList<T> which support AddNewRecord. It seems that the ObservableCollection does not support this feature.
Hope this helps.
As my example presents: BindingList<Directory> directories =new BindingList<Directory>();
So the BindingList you refering i allready using, and i do have an AddNew option on the first level, but not on the second.
Please see my image.
No my next problem is that when i add a row on the first level on th object Directory, which has also another level Folders, with a value like "A:\".
It will be added, but it hasn't got the header info for creating folder element. Has someone a solution for that?
Could you please give some more information or better a screenshot because I don't think I see what you mean.
Thanks,
Alex.
See my image, i just added "A:\" through the addnew bar which succeeds.
But i can't add items to "A:\",in this case folders
C:\ and D:\ both have elements, accept for A:\..
How can i create elements UNDER A:\ because i don't see an + sign?
I hope my example is clarifying.
When you add a record, for example "A" the expansion indicator should appear as the record was added and if you expand it you should be able to add childs to this record.