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

Binding ItemsSource from DataSet

2 Answers 93 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Vývoj GAMO
Top achievements
Rank 2
Vývoj GAMO asked on 10 Feb 2012, 11:10 AM
Hi,

how is it possible to bind database table/view from DataSet to ItemsSource in RadGridView in XAML? I need to use adding new rows in UI of RadGridView.


Thanks,
Maros

2 Answers, 1 is accepted

Sort by
0
Accepted
Pavel Pavlov
Telerik team
answered on 10 Feb 2012, 12:47 PM
Hello Marcos,

You may :

1. Set your DataTable as DataContext of RadGridView and use ItemsSource={Binding}
or
2. Expose your DataTable as a static resource and use syntax like ItemsSource={Binding , Source ={StaticResource MyTable}}


Regards,
Pavel Pavlov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Vývoj GAMO
Top achievements
Rank 2
answered on 10 Feb 2012, 01:07 PM
Thanks, DataContext works fine.

Maros
Tags
GridView
Asked by
Vývoj GAMO
Top achievements
Rank 2
Answers by
Pavel Pavlov
Telerik team
Vývoj GAMO
Top achievements
Rank 2
Share this question
or