I have the following linked Grid and Form
The datacontext for this page is created in the loaded event of the page like this
Although the list of books is shown in both the grid and the form, it isn't synchronized and clicking on various records in the grid doesn't cause the form to show the selected item.
Any help would be appreciated.
<
telerik:RadGridView
Name
=
"radGridView1"
ItemsSource
=
"{Binding }"
AutoGenerateColumns
=
"True"
IsFilteringAllowed
=
"True"
IsBusy
=
"False"
DataLoadMode
=
"Synchronous"
CanUserReorderColumns
=
"True"
CanUserSortColumns
=
"True"
/>
<
telerik:RadDataForm
Name
=
"radDataForm1"
ItemsSource
=
"{Binding }"
AutoGenerateFields
=
"True"
/>
The datacontext for this page is created in the loaded event of the page like this
public
MainPage()
{
InitializeComponent();
this
.Loaded +=
new
RoutedEventHandler(MainPage_Loaded);
}
void
MainPage_Loaded(
object
sender, RoutedEventArgs e)
{
ObservableCollection<Book> myBooks =
new
ObservableCollection<Book>
{
new
Book{Title=
"The Man who sold the World"
,Author=
"James Martin"
},
new
Book{Title=
"Thow to Make Friends and Influence People"
,Author=
"Peter Ducker"
},
new
Book{Title=
"Programming LINQ and .Net 4 Framework"
,Author=
"Chris Anderson"
}
};
this
.DataContext = myBooks;
}
Although the list of books is shown in both the grid and the form, it isn't synchronized and clicking on various records in the grid doesn't cause the form to show the selected item.
Any help would be appreciated.