views:

660

answers:

1

I've been spoiled by the SqlDataSource, but I'm in a scenario where I can't use it. Is there an alternative to GridView that implements sorting and paging for arbitrary data sources? I'm trying to avoid writing 1000s of lines of custom paging and sorting for each grid. At the office I use Telerik's grid, but for my hobby project, spending that much money is out of the question.

EDIT: It just seems to a lazy programmer like me that if I connect a grid and a data source it should automatically page and sort. So I'm looking for combinations of datasources + grids that result in code-less paging and sorting.

So far the only examples I know of are Telerik's grid (cost $, implements sorting and paging in the grid) and SqlDataSource + GridView (implements sorting and paging in the DataSource, but requires MS-SQL to be available)

A: 

I'm not sure if you are asking for an alternate to the Gridview or the SqlDataSource....

But you can always use an ObjectDataSource and connect it to any bindable object, collection or Dataset http://msdn.microsoft.com/en-us/library/aa479347.aspx

We never use a SqlDataSource, we use a wrapper for a sql call out of our data layer, or use a collection in the ODS.

Glennular
True, but the ObjectDataSource doesn't implement sorting. I'll edit my question to make it clearer.
MatthewMartin
Your correct it doesn't impliment sorting because your datasource is supposed to. The ObjectDatasource has a SortParameterName, just as the SQLDataSource has.
Glennular