Hi Nebojsa Danilovic,
I have investigated the problem and it turned out that there is a bug in RadGridView that is manifested when RadGridView is bound to an empty ICollectionView. We have logged the issue as PITS item and you will be able to track the status of this bug.
For the time being I can offer you a workaround that fixes the issue - it is not as elegant as the original code but it should work.
sender, RoutedEventArgs e)
DSBag.DSEntities dSEntities =
// Load data into SchoolTypes. You can modify this code as needed.
System.Windows.Data.CollectionViewSource schoolTypesViewSource = ((System.Windows.Data.CollectionViewSource)(
System.Data.Objects.ObjectQuery<DSBag.SchoolType> schoolTypesQuery =
schoolTypesViewSource.Source = schoolTypesQuery.Execute(System.Data.Objects.MergeOption.AppendOnly);
// subscribe to CurrentChanged
sender, System.EventArgs e)
var schoolTypesViewSource = ((System.Windows.Data.CollectionViewSource)(
&& schoolTypesViewSource.View !=
// get the current item of master grid
var current = (SchoolTypes)schoolTypesViewSource.View.CurrentItem;
|| current.Schools.Count <= 0)
// clear child grid if no schools are associated
.schoolsRadGridView.ItemsSource = current.Schools;
Also you should remove the ItemsSource binding for schooldRadGridView that is defined in XAML. Finally, you should set IsSynchronizedWithCurrentItem to true for schoolTypesRadGridView. IsSynchronizedWithCurrentItem was introduced a couple of weeks ago and is available in our latest Internal Build.
Thank you for reporting this issue - I have updated your Telerik points. We will try to fix the related bug as soon as possible. Sorry for the inconvenience.
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?
Telerik Public Issue Tracking
system and vote to affect the priority of the items.