jQuery 用于 ASP.NET MVC 的网格控件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/177275/
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
grid controls for ASP.NET MVC?
提问by MikeJ
If you are using ASP.NET MVC how are you doing grid display? Rolled your own? Got a library from somewhere?
如果您使用的是 ASP.NET MVC,您如何进行网格显示?自己卷的?有图书馆吗?
These are some of the known grid display solutions I have found for ASP.NET MVC
这些是我为 ASP.NET MVC 找到的一些已知的网格显示解决方案
- ASP.NET MVC Flexgrid - Has nice column layout method
- Code based ASP.NET MVC GridView- simple, small, clean
- MVC Contrib- grid from codePlex
- jQueryGrid- jQuery grid
- Datatables- jQuery plugin - believed to be section 508 compliant (.NET binding)
- extJS- cross browser RIA framework - has grid support
- Ingrid- jQuery data grid
- jqxGrid- jQuery data grid
- Telerik MVC- jQuery based grid that is GPL v2 licensed, commercial version also available
- MVC Controls Toolkit- Client Site Based Grid
- Infragistics igGrid- jQuery based MVC grid
- dhtmlxGrid- Ajax-enabled JavaScript grid control
- ASP.net MVC Awesome Ajax List- a different, very flexible approach, can be used as a grid
- Syncfusion MVC Grid- Commercial grid
- ASP.net MVC Awesome Grid- part of the Awesome library (jQuery based)
- Shield UI Grid for ASP.NET MVC
- Grid controls for ASP.NET MVC 5 projects
- ASP.NET MVC Flexgrid- 有很好的列布局方法
- 基于代码的 ASP.NET MVC GridView- 简单、小巧、干净
- MVC Contrib- 来自 codePlex 的网格
- jQueryGrid- jQuery 网格
- 数据表- jQuery 插件 - 被认为符合第 508 节(.NET 绑定)
- extJS- 跨浏览器 RIA 框架 - 具有网格支持
- Ingrid- jQuery 数据网格
- jqxGrid- jQuery 数据网格
- Telerik MVC- 基于 jQuery 的网格,获得 GPL v2 许可,也提供商业版本
- MVC 控件工具包- 基于客户端站点的网格
- Infragistics igGrid- 基于 jQuery 的 MVC 网格
- dhtmlxGrid- 支持 Ajax 的 JavaScript 网格控件
- ASP.net MVC Awesome Ajax List- 一种不同的,非常灵活的方法,可以用作网格
- Syncfusion MVC Grid- 商业网格
- ASP.net MVC Awesome Grid- Awesome 库的一部分(基于 jQuery)
- 为 ASP.NET MVC 屏蔽 UI 网格
- ASP.NET MVC 5 项目的网格控件
If you know of anything else that you are using or know to be good, please let me know.
如果您知道您正在使用的其他任何东西或知道它是好的,请告诉我。
采纳答案by Sean Carpenter
回答by Sam Saffron
We use Slick Gridin Stack Exchange Data Explorer (example containing 2000 rows).
我们在 Stack Exchange Data Explorer 中使用Slick Grid(示例包含 2000 行)。
I found it outperforms jqGridand flexigrid. It has a very complete feature set and I could not recommend it enough.
我发现它优于jqGrid和flexigrid。它有一个非常完整的功能集,我不能推荐它。
Samples of its usage are here.
其用法示例在此处。
You can see source samples on how it is integrated to an ASP.NET MVC app here: https://code.google.com/p/stack-exchange-data-explorer/
您可以在此处查看有关如何将其集成到 ASP.NET MVC 应用程序的源示例:https: //code.google.com/p/stack-exchange-data-explorer/
回答by berko
We have just rolled our own due to limited functionality requirements on our grids. We use some JQuery here and there for some niceties like pagination and that is all we really need.
由于我们网格的功能要求有限,我们刚刚推出了自己的。我们在这里和那里使用一些 JQuery 来实现一些细节,比如分页,这就是我们真正需要的。
If you need something a little more fully featured you could check out ExtJs grids here.
如果您需要更全面的功能,您可以在此处查看 ExtJs 网格。
Also MvcContrib has a grid implementation that you could check out - try here. Or more specifically here.
回答by Dejan Milicic
I just discovered Telerik has some great components, including Grid, and they are open source too. http://demos.telerik.com/aspnet-mvc/
我刚刚发现 Telerik 有一些很棒的组件,包括 Grid,而且它们也是开源的。 http://demos.telerik.com/aspnet-mvc/
回答by Hrvoje Hudo
If it's just for viewing data, I use simple foreach or even aspRepeater. For editing I build specialized views and actions. Didn't like webforms GridView inline edit capabilities anyway, this is kinda much clearer and better - one view for viewing and another for edit/new.
如果只是为了查看数据,我使用简单的 foreach 甚至 aspRepeater。对于编辑,我构建了专门的视图和操作。反正不喜欢 webforms GridView 内联编辑功能,这更清晰更好 - 一个视图用于查看,另一个用于编辑/新建。
回答by Manuel Castro
jqGrid is $299 if you use a special version that has server side integration, but it really is not that difficult to use the open source free version with ASP.NET MVC, once you get your jquery configuration straight it's almost as simple to use as any other licensed grid:
如果您使用具有服务器端集成的特殊版本,jqGrid 为 299 美元,但在 ASP.NET MVC 中使用开源免费版本确实不是那么困难,一旦您直接获得 jquery 配置,它几乎和任何使用一样简单其他许可电网:
http://haacked.com/archive/2009/04/14/using-jquery-grid-with-asp.net-mvc.aspx
http://haacked.com/archive/2009/04/14/using-jquery-grid-with-asp.net-mvc.aspx
回答by Raj Kaimal
回答by Francesco Abbruzzese
You can use also the Insert/update/delete datagrid of my MVC Controls Toolkit available here on codeplex: http://mvccontrolstoolkit.codeplex.com/. Hereyou can download a complete example, herethe datagrid working and hereand heretutorials. The DataGrid works completely client side and mantains thechange set between posts. Yes it mantains Changeset, this means, you can access both old version and modified version of each record to see what changes to pass to the DB(what need to be modified deleted or inserted). This Changeset is mantained after several posts till you either confirm or cancel the modifications on the server side.
您还可以使用我的 MVC 控件工具包的插入/更新/删除数据网格,可在 codeplex 上找到:http://mvccontrolstoolkit.codeplex.com/ 。在这里你可以下载一个完整的例子,这里是数据网格工作,这里和这里教程。DataGrid 完全在客户端工作并维护帖子之间的更改集。是的,它包含变更集,这意味着,您可以访问每条记录的旧版本和修改版本,以查看要传递给数据库的更改(需要修改删除或插入的内容)。此变更集在多次发布后维护,直到您在服务器端确认或取消修改。
回答by Mark Kadlec
If it is read-only a good idea would be to create a table, then apply some really easy-but-powerful JQuery to that.
如果它是只读的,一个好主意是创建一个表,然后应用一些非常简单但功能强大的 JQuery。
For simple alternative colour, try thissimple JQuery.
对于简单的替代颜色,试试这个简单的 JQuery。
If you need sorting, this JQuery plug-insimply rocks.
如果您需要排序,这个 JQuery 插件简直就是摇摆不定。
回答by MvcSurfer
I tried the example hereof the Mvc Controls Toolkit grid. It appears a quite powerful and easy to use grid. The tutorial not only explain how to use the grid but also how to do paging, organize a view model and data annotations. It is worth to read it.
我在这里尝试了Mvc Controls Toolkit 网格的示例。它看起来是一个非常强大且易于使用的网格。本教程不仅解释了如何使用网格,还解释了如何进行分页、组织视图模型和数据注释。值得一读。