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

Binding a collection to GridViewDataColumn

2 Answers 71 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Binu Abraham
Top achievements
Rank 1
Binu Abraham asked on 04 Feb 2010, 07:00 AM
Hello
I'm binding a IList<BusinessObject> to the GridViewDataColumn through a converter.
Code snippet:

                          <telerik:GridViewDataColumn
                                                        Header="Classes"
                                                        Width="15*"
                                                        UniqueName="AuthorisationClasses"
                                                        DataMemberBinding="{Binding AuthorisationClasses, Converter={StaticResource AuthorisationClassesListConverter}}"

The view gets updated dynamically if I make the AuthorisationClasses an ObservableCollection. I was wondering if I could make the view update dynamically without making it an ObservableCollection. The reason being, AuthorisationClasses is a business entity and all the business entites in our solution are of type List<T>.
Thanks in advance

Regards
Binu
 

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 04 Feb 2010, 07:14 AM
Hi Binu,

If you implement INotifyCollectionChanged for this lists you can use them instead ObservableCollection.

Sincerely yours,
Vlad
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Binu Abraham
Top achievements
Rank 1
answered on 05 Feb 2010, 12:29 AM
Hi Vlad
Thanks for that..In the code snippet that was posted before, would it be possible to use a Datatemplate for displaying the ObservableCollection instead of a Converter?

So could I use something like:
   <DataTemplate x:Key="CheckBoxParentTemplate" DataType="{x:Type System:ObservableCollection<AuthorisationClasses>}">
for the DataColumn of the GridView?..

Thanks again

Regards
Binu
Tags
GridView
Asked by
Binu Abraham
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Binu Abraham
Top achievements
Rank 1
Share this question
or