DataGrid and DataForm issue with MVVM

2 posts, 0 answers
  1. Sameer
    Sameer avatar
    22 posts
    Member since:
    Sep 2011

    Posted 28 Jan 2012 Link to this post

    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.


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



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




    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



  2. Ivan Ivanov
    Ivan Ivanov avatar
    1114 posts

    Posted 31 Jan 2012 Link to this post

    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.

    Ivan Ivanov
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. DevCraft R3 2016 release webinar banner
Back to Top