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

Gridview Source bindin property

2 Answers 26 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Pierre
Top achievements
Rank 1
Iron
Pierre asked on 16 Jun 2011, 02:02 PM
Hi, I try to bing a property to the GridView.Source like this:
Binding bind = new Binding(Binding);
bind.Mode = BindingMode.TwoWay;
GridView.SetBinding(RadGridView., bind);

to do programatically this Xaml code:
ItemsSource="{Binding PagedSource, ElementName=radDataPager1}"

I can't found the property ItemSource in the RadGridView code behind.

And whats about this xmal property:
SelectedItem="{Binding RechResultatSelection, Mode=TwoWay}"

2 Answers, 1 is accepted

Sort by
0
Pierre
Top achievements
Rank 1
Iron
answered on 16 Jun 2011, 02:49 PM
I can't add the dynamically created RadGridView into a stackpanel like this:
StackPanelRetour.Children.Add(GridView);
I go this error:
Error    3    Argument 1: cannot convert from 'Telerik.Windows.Controls.RadGridView' to 'System.Windows.UIElement' 

Do i use the wrong object?
0
Pierre
Top achievements
Rank 1
Iron
answered on 16 Jun 2011, 03:07 PM
Ok I found it.
I forgot to add the Telerik.Windows.Data reference to my projet.
Now all working good.
Tags
GridView
Asked by
Pierre
Top achievements
Rank 1
Iron
Answers by
Pierre
Top achievements
Rank 1
Iron
Share this question
or