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

How to sort entity framework results ( ObjectDataSource )

1 Answer 88 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Serban
Top achievements
Rank 1
Serban asked on 21 Dec 2010, 10:27 PM
I have a query done in the business layer of my ASP.net AJAX application. It uses EF 4.0. It returns an ObjectDataSource.

How can I put this into a RadGrid and still have Sorting?

Is it possible for RadGrid to sort ObjectDataSource and/or a List (of)?

Serban.

1 Answer, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 27 Dec 2010, 11:31 AM
Hello Serban,

RadGrid can bind to many different kinds of data sources including ObjectDataSource.
There are two possible options when you require sorting:
1. You can use the NeedDataSource event handler to assign any data collection to the grid. This way the grid handles the sorting automatically (when AllowSorting="true").
2. If you have declaratively set binding to ObjectDataSource then you should also set the OverrideDataSourceControlSorting property of the MasterTableView to true to let the grid handle the sorting functionality.

Kind regards,
Marin
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
Serban
Top achievements
Rank 1
Answers by
Marin
Telerik team
Share this question
or