简体   繁体   中英

DevExpress vs. Telerik grids for ASP.NET web applications

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!!

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.

[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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM