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

RadDataForm different source binding

1 Answer 43 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
Zamel
Top achievements
Rank 1
Zamel asked on 04 Apr 2013, 01:02 PM
Hi,

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. :-(

1 Answer, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 09 Apr 2013, 03:09 PM
Hi,

 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.

Regards,
Ivan Ivanov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
DataForm
Asked by
Zamel
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Share this question
or