asp.net-mvc ASP.NET MVC Grid控件对比

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9174795/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 01:43:07  来源:igfitidea点击:

ASP.NET MVC Grid controls comparison

asp.net-mvcasp.net-mvc-3jquery-ui

提问by RKP

There seems to be many grid controls for MVC, but I can't find any comparison between them i.e. which one is better over another one. Some support server-side data bindingand some support client-side data binding. I found the following.

MVC 似乎有很多网格控件,但我找不到它们之间的任何比较,即哪个比另一个更好。有的支持server-side data binding,有的支持client-side data binding。我发现了以下内容。

  1. Are client-side binding grids better than the server-side ones?
  2. Are the jQuery grid controls better than the controls like WebGrid?
  1. 客户端绑定网格是否比服务器端网格更好?
  2. jQuery 网格控件是否比 WebGrid 之类的控件更好?

Could you help me choose one among these with reasons for the same? I need Ajax support, paging, sortingetc (not inline grid editing, though no harm if that functionality is available) and also I need to be able to define templated columnslike gridview for some of the columns.

你能帮我从这些中选择一个吗?我需要的Ajax supportpagingsorting等(不是内联电网的编辑,虽然没有伤害,如果该功能可用),也是我需要能够define templated columns像GridView的一些列。

  1. Webgrid

  2. MVC contrib

  3. MVC controls toolkit

  4. jQGrid

  1. 网络网格

  2. MVC 贡献

  3. MVC 控件工具包

  4. 网格

回答by The Muffin Man

Your list doesn't include the free Telerik controls for MVC found here

您的列表不包括此处找到的免费 MVC Telerik 控件

The grid control supports, templating, AJAX, sorting, filtering, paging etc. It's an absolutely amazing grid. I can't speak for the others, but I strongly suggest you evaluate Telerik before making a decision.

网格控件支持模板、AJAX、排序、过滤、分页等。这是一个绝对惊人的网格。我不能代表其他人,但我强烈建议您在做出决定之前评估 Telerik。

Check out the MVC demos here

在此处查看 MVC 演示

Edit:One of the main reasons I love this grid is because AJAX functionality isn't treated as a second class citizen. You can perform all the same functionality that you can using server binding.

编辑:我喜欢这个网格的主要原因之一是因为 AJAX 功能不被视为二等公民。您可以执行与使用服务器绑定相同的所有功能。

Update 12/2013

更新 12/2013

The free Telerik controls have been deprecated in favor of Kendo UI. However you can still download the free controls and view their documentation.

免费的 Telerik 控件已被弃用,以支持 Kendo UI。但是,您仍然可以下载免费控件并查看其文档。

I still use this from time to time. I can't justify paying for Kendo for small projects as the controls are very similar.

我仍然时不时地使用这个。我无法证明为小型项目支付 Kendo 费用是合理的,因为控件非常相似。

Documentation

文档

Controls

控件

回答by Francesco Abbruzzese

Which grid is the best one for you...depends on your specifications...I will not enter in the comparison among the grids...since I am the author of the Mvc Controls Toolkit grid...so my opinion would be biased :)

哪种网格最适合您...取决于您的规格...我不会参与网格之间的比较...因为我是 Mvc Controls Toolkit 网格的作者...所以我的意见是有偏见:)

However, I can give you an idea on how to compare your specs against the features of the grids discussig how to choose between server side and client side bindings: 1) First of all BOTH of them are useful...depending on the problem to be faced 2) You said you need paging and sorting...now do you prefer sending all data to the client and then to let it pages and sorts all data received or you prefer doing this operation on the server and sending to the client JUST ONE PAGE OF DATA? For big amount of data just the second option is acceptable...but for small amout of data all two choices are viable depending on the application needs. Now if you would like performing sorting and paging on the server side...a server side binding is better.

但是,我可以让您了解如何将您的规格与讨论如何在服务器端和客户端绑定之间进行选择的网格的功能进行比较:1)首先,它们两个都很有用……取决于要解决的问题面临 2) 你说你需要分页和排序...现在你更喜欢将所有数据发送到客户端,然后让它对收到的所有数据进行分页和排序,还是你更喜欢在服务器上执行此操作并发送到客户端一页数据?对于大量数据,第二个选项是可以接受的……但是对于少量数据,根据应用程序的需要,这两种选择都是可行的。现在,如果您想在服务器端执行排序和分页……服务器端绑定会更好。

If you decide for client side bindings an acceptable choice is jQGrid...or some other purely javascript grid. If you would like to customize the grid features...with say columns, or rows templates, then you have to consider using software based on knockout.js

如果您决定使用客户端绑定,那么可接受的选择是 jQGrid...或其他一些纯 javascript 网格。如果您想自定义网格功能……比如列或行模板,那么您必须考虑使用基于 Knockout.js 的软件

The Mvc Controls Toolkit has both 2 kinds of sever side binding grids, and give you the opportunity to customize a client side grid by using Client Blocks and the ClientBlockRepeater

Mvc Controls Toolkit 有两种服务器端绑定网格,让您有机会使用 Client Blocks 和 ClientBlockRepeater 自定义客户端网格