用於 ASP.NET Web 應用程序的 DevExpress 與 Telerik 網格 (DevExpress vs. Telerik grids for ASP.NET web applications)


問題描述

用於 ASP.NET Web 應用程序的 DevExpress 與 Telerik 網格 (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!!


參考解法

方法 1:

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.  

方法 2:

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

方法 3:

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.  

(by Mike ColeStradasToddDavid Robbins)

參考文件

  1. DevExpress vs. Telerik grids for ASP.NET web applications (CC BY-SA 3.0/4.0)

#devexpress #asp.net-3.5 #.net #telerik






相關問題

修改 aspxgrid 中的列以顯示超鏈接和支持組 (Modify column in aspxgrid to display a hyper link and support group by)

沒有標誌的Javascript不區分大小寫的正則表達式 (Javascript case insensitive regex without flags)

MVC 4 - Gặp lỗi khi cố gắng thêm một báo cáo mới (MVC 4 - Getting error while trying to add a new report)

網格列包含 int64 值,但過濾器顯示字符串並且不起作用/ (Grid column contains int64 values but filter shows strings and doesn't work/)

我應該每年為保持 devexpress 應用程序的運行付費嗎 (Should I pay every year for keep devexpress app running)

Excel 和 Word DevExpress (Excel & Word DevExpress)

用於 ASP.NET Web 應用程序的 DevExpress 與 Telerik 網格 (DevExpress vs. Telerik grids for ASP.NET web applications)

添加控件會導致 Silverlight 掛起 (Adding controls causes silverlight to hang)

根據用戶控件的大小調整面板的大小 (Resizing a Panels based on the size of user control)

vs2010 asp.net設置斷點問題 (Problem in setting breakpoint in vs2010 asp.net)

單擊按鈕後行命令不觸發 (Rowcommand do not fire after clicking button)

DevExpress 11.1 在 IIS 7+ 中不起作用 (DevExpress 11.1 not functional in IIS 7+)







留言討論