This question is locked. New answers and comments are not allowed.
I have 2 RadGridView's with a master detail relationship.
Grid 1#
Name="LookupTypesGrid"
ItemsSource="{Binding Path=LookupTypes, Mode=TwoWay}"
Grid 2#
ItemsSource="{Binding ElementName=LookupTypesGrid, Path=SelectedItem.LookupValues, Mode=TwoWay}"
- I am able to insert rows into Grid #1, but not into Grid #2.
- The default constructor for the detail objects has no parameters.
Any thoughts?
Bryan
4 Answers, 1 is accepted
0
Hi Bryan,
Could you please provide more information about your project. Maybe some source code if possible. The fastest way to resolve this issue would be if you prepare a small dummy sample project with your set-up, open a separate support ticket and attach it. We will immediately take a look at it and see what is going wrong. Thanks in advance.
Best wishes,
Ross
the Telerik team
Could you please provide more information about your project. Maybe some source code if possible. The fastest way to resolve this issue would be if you prepare a small dummy sample project with your set-up, open a separate support ticket and attach it. We will immediately take a look at it and see what is going wrong. Thanks in advance.
Best wishes,
Ross
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Bryan
Top achievements
Rank 1
answered on 18 Jun 2010, 04:27 PM
Here is the project.
http://www.baytechconsulting.com/downloads/TelerikMasterDetail1.zip
It was too large to upload to your site.
Again the issues is I cannot add to the detail side of the master detail.
Bryan
http://www.baytechconsulting.com/downloads/TelerikMasterDetail1.zip
It was too large to upload to your site.
Again the issues is I cannot add to the detail side of the master detail.
Bryan
0
Bryan
Top achievements
Rank 1
answered on 22 Jun 2010, 12:35 AM
Ross,
Did you have a chance to look at it?
Bryan
Did you have a chance to look at it?
Bryan
0
Accepted
Hello Bryan,
The problem with inserting new rows in the child grid comes from the fact that the collection providing data for it is neither implementing IList, nor is EditableCollection. As a result elements cannot be inserted or deleted.
There are a couple of options: you may implement IList interface in the definition of the data for your child grid, or use DetailTemplate that is far more flexible than the hierarchy and to insert the grid in it.
You can find more information in this forum thread or this blog post.
As you can see in the project from the forum, the data for the child grid is:
However, as we need it to be EditableCollection or implementing IList, a class EntityCollectionView is created and it is used as the ItemsSource for the child grid. Thus you can insert and delete items from it.
Best wishes,
Maya
the Telerik team
The problem with inserting new rows in the child grid comes from the fact that the collection providing data for it is neither implementing IList, nor is EditableCollection. As a result elements cannot be inserted or deleted.
There are a couple of options: you may implement IList interface in the definition of the data for your child grid, or use DetailTemplate that is far more flexible than the hierarchy and to insert the grid in it.
You can find more information in this forum thread or this blog post.
As you can see in the project from the forum, the data for the child grid is:
private EntityCollection<
Album
> _albums;
However, as we need it to be EditableCollection or implementing IList, a class EntityCollectionView is created and it is used as the ItemsSource for the child grid. Thus you can insert and delete items from it.
Best wishes,
Maya
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items