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

[Solved] Two Way Binding

2 Answers 66 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
John Campbell
Top achievements
Rank 1
John Campbell asked on 22 Feb 2010, 09:51 AM
I'm looking for a sample on how to achieve two-way binding of a radGridView to an Observable Collection.  Preferably in VB and preferably with all the bindings configured in the code behind instead of teh XAML. 

The case we are trying to implement has the Grid bound to one observable collection and a combobox column bound to a different observable collection.

We are not sure which properties to set and in what order.  If you could either point us to a sample, or provide a few lines of psuedo code, it would be appreciated.

2 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 22 Feb 2010, 10:06 AM
Hello John Campbell,

You can check out the Data Sources and Data Source with Change Notifications online examples. This should be exactly what you are looking for.

Let us know if you have any other questions after examining the two examples.

Greetings,
Ross
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
John Campbell
Top achievements
Rank 1
answered on 22 Feb 2010, 11:38 PM
Thanks for the prompt reply.  We were already lookiing at those examples and just couldn't make them work.  Honestly, I think they are a bit complex for illustrating the point.

What finally worked for us was the following:

 

Dim oCollectionViewSource As New Data.CollectionViewSource

 

oCollectionViewSource.Source = MyObservableCollection

MyTelerikGrid.ItemsSource = oCollectionViewSource.View

The samples seem to use a binding object, which we have not used.  Are we losing any functionality by going this way?

Tags
GridView
Asked by
John Campbell
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
John Campbell
Top achievements
Rank 1
Share this question
or