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

Binding to Observable collection

3 Answers 105 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Keith Stephens
Top achievements
Rank 1
Keith Stephens asked on 09 Mar 2011, 12:22 AM
Hello,

I am creating a page that shows a RadListView of employees, and when an employee is selected I need to populate a radgrid with some further information.

I want to create on observable collection and then bind to my grid. (I can do this ok), but my problme now is how do I get the Paging and sorting ect.. to work.
I am having a difficult time doing this so examples would be great.

Thanks
Keith.

3 Answers, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 14 Mar 2011, 12:54 PM
Hi Keith,

The ObservableCollection<T> class is created for the purposes of two way binding which is not a feature of ASP.NET applications. Therefore, it is not supported by RadGrid for ASP.NET AJAX and I would suggest you to either use a Silverlight GridView for this purpose or switch to some other collection class to hold your data.

Greetings,
Tsvetina
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Keith Stephens
Top achievements
Rank 1
answered on 14 Mar 2011, 05:28 PM
Thank you for your reply, can you offer any advice on what I can or should use.  I used the observable collection because I have used your silverlight grid in the past.  And that is the only way I know to bind using objects.  I am not familiar with your .net ajax controls which is what I need to use now.

I am trying to get paging, sorting ect.. to work, but use my objects rather than binding to the asp:sqldatasource control.

Thanks,
Keith.
0
Accepted
Tsvetina
Telerik team
answered on 15 Mar 2011, 07:57 AM
Hi Keith,

RadGrid supports binding to various other data sources. You can see our documentation on server-side binding in this section of our online help and also an online demo demonstrating binding to different types of datasource.

As long as you bind the control in theNeedDataSource event to a supported datasource, sorting, filtering, paging will work by default.

Best wishes,
Tsvetina
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Grid
Asked by
Keith Stephens
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Keith Stephens
Top achievements
Rank 1
Share this question
or