This is a migrated thread and some comments may be shown as answers.

DataGrid and DataForm issue with MVVM

1 Answer 89 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
Sameer
Top achievements
Rank 1
Sameer asked on 29 Jan 2012, 03:00 AM

I am struggling with RadGrid and RadDataForm issue from past 2 days.  

The examples on the internet for this are quite basic and straight forward. Let me try to explain my scenario here:

On my silverlight app, on the home page I have 2 different content controls.  I have 2 views . These 2 views are displayed in the content controls of the home page.

I have 1 View Model bound with these 2 views. In the first view I have datagrid displaying list of countries. On the second view I have 1 dataform displaying details of the selected country in the grid of first view.

View1:

<DataGrid ItemsSource="{Binding Countries}" 
SelectedItem="{Binding SelectedCountry, Mode=TwoWay}">

View2:

 

<DataForm x:Name="dataForm"     CurrentItem="{Binding 
SelectedCountry}" ItemsSource="{Binding Countries}"> </DataForm>

VM1:

 

QueryableCollectionView 

Countries collection

 

The problem is whenver I select a company in radgrid from left page, I don't get selectedcompany details in right page view in raddataform. 

Thank you for your help

 

Sameer

1 Answer, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 31 Jan 2012, 05:12 PM
Hi Sameer,

I have prepared an example project for. I am attaching it for your reference. The RadGridView and RadDataForm are not placed in separate views, but as they are independent from one another, this approach should be applicable in your scenario.

Regards,
Ivan Ivanov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
DataForm
Asked by
Sameer
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Share this question
or