RadDataForm different source binding

2 posts, 0 answers
  1. Zamel
    Zamel avatar
    20 posts
    Member since:
    Aug 2012

    Posted 04 Apr 2013 Link to this post


    Is there a way the raddataform can get its source from a different user control? So my scenario is this:

    I have a user control with radgridview in it. This user control is configured dynamically, so we cannot really say what the items in the gridview will be. We assign the items in the gridview through an sql view, the rest is history. Now, I want to use a dataform for that user control. So what I will have now is, a user control with my user control for grid view and the raddataform. I hope you understand what I mean. Now, how do I make each other talk with each other? The samples in the demos are very straightforward, the gridview is in the same user control with the dataform so you can easily assign the same itemsource. But in my case, I have to implement first my user control to get the gridview and from that implement the dataform. I really hope there's a solution for this. 

    Please, please, please help me please. :-(
  2. Ivan Ivanov
    Ivan Ivanov avatar
    1201 posts

    Posted 09 Apr 2013 Link to this post


     You can use a single ViewModel for both of these Views and you will be able to bind each of the Controls' ItemsSource properties to a single collection property of the ViewModel. I guess you are refering to some demo that uses ElementName binding. It is easier, but works only for controls that are located in the same name scope of the visual tree.

    Ivan Ivanov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top