views:

1803

answers:

3

I dropped the trial version of the DevExpress GridView in my ASP.NET project and found it to be very powerful, easy to setup, and flexible. However, I think it only does Default Paging and not Custom Paging (pulling down all of the records per page isntead of just the records of the page). I looked into see if I could figure out how to add this functionality to a DevExpress grid and it appears to be not so easy unless you want to user LinqToSQL or DevExpress' ORM (I don't).

Does Telerik offer Custom Paging to be easily set up, without having to change the way I do things? How does Telerik play with nHibernate as I would like to pick that up in the future.

Thanks!!

+3  A: 

[Full Disclosure: I work at Telerik.]

Yes, the Telerik RadGrid for ASP.NET AJAX does fully support both out of the box "simple" paging and easy custom paging. In fact, it also supports additional paging "types," such as SEO paging and Virtual paging.

For Custom Paging, you simply need to take these steps with the RadGrid:

  1. Set AllowPaging = True and AllowCustomPaging = True on your RadGrid
  2. Write code to query only the records you want
  3. Set the Grid's VirtualItemCount so it "knows" how many total records exist in the data source

You can see a live example with code here:

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/custompaging/defaultcs.aspx

You can also do declarative custom paging with the ObjectDataSource. For additional help with custom paging and RadGrid, be sure to check out these articles in the online docs:

http://www.telerik.com/help/aspnet-ajax/grdcustompaging.html

http://www.telerik.com/help/aspnet-ajax/grdcustompagingthroughobjectdatasourcepopulation.html

Finally, to your question about nHibernate, the RadGrid also works well with that ORM. I have personally used nHibernate on a few projects in the past with the RadGrid and had no problems. When combined with the RadGrid's ability to bind directly to web services and render on the client, I was able to create "lightning fast" grids for my pages.

Hope that helps. If you have any other Telerik questions, just let me know.

Todd
Todd, you guys put out great products and Telerik's support has been stellar. Thanks for reducing my hours toiling away at projects!
David Robbins
Much appreciated. I think I am going to download and try the trial version tomorrow, so those links will help a lot! Thanks!!
Mike C.
Hi Todd, thought I would point out a typo on Telerik's webpage: http://www.telerik.com/products/aspnet-ajax/grid.aspx#sorting
Mike C.
@David - Thanks! Glad the tools are doing their job and making your life easier. @Mike - Hope you enjoy the trial. Feel free to ping me with questions. And thanks for the typo highlight. We'll get that fixed!
Todd
We just bought the Premium Collection thanks to your post. Hope you get commission for that!
Mike C.
@Mike - No commission. It's my job to help developers, so hopefully that's what I've done. Have fun with the RadControls. If you need help, be sure to visit the Telerik Forums: http://www.telerik.com/forums
Todd
+1  A: 

Essentially you can bind IQueryable objects to RadGrid, so your choice of ORM or domain objects really should affect how you pump data to the grid. As as far paging is concerned it is fairly easy to configure the grid with the out-of-the-box settings.

Go through the sample apps that Telerik has on their site, as they cover most scenarios that you will consider when you first use the products.

David Robbins
+1  A: 

I use both telerik and devexpress. Both support standard data sources. If you don't mind writing a little code. myDa.Fill(myDataTable) myDataView = myDataTable.DefaultView I did have one issue that caused me to add Dev Express, not fully a paging issue but I had an issue with hierarchical data. I was all telerik until i needed a hierarchical datagrid. Telerik handles about 4 levels in the datagrid. The paging is good but I have about 9 levels of data. I tried to do it with telerik tree control and it didn't do the job as it was not designed for that type of work. Dev Express had a DataGrid-TreeView hybrid table. It rocks. Fast, clean, works well. So I have to give the DataGrid win to Dev express in this area. It also had paging built in. The documentation from dev express for how to do it in virtual mode is not so good but I figured it out and have an app in production that uses a massive hierarchical yet still pulls dynamicly, (on drill down) datagrid-treeview.

Stradas