在ASP.NET MVC和AJAX分页表 [英] Paged table with ASP.NET MVC and AJAX

查看:157
本文介绍了在ASP.NET MVC和AJAX分页表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在找好的模式实施结果的分页表在ASP.NET MVC与排序,筛选和分页通过AJAX提供。在我看来,我应该有我的控制器动作只提供数据,而不是标记保持关注分离 - 这样的Ajax回调将提供新表的数据和寻呼机设置,客户端将使用重新呈现表。或者,我可以用有控制器返回一个局部视图,我只需更换页面上的容器内。

I'm looking for good patterns for implementing a paged table of results in ASP.NET MVC with sorting, filtering, and paging provided via AJAX. It seems to me that I should have my controller actions provide only the data and not mark up to maintain the separation of concerns -- so the Ajax callback would provide new table data and pager settings which the client would use to re-render the table. Alternatively, I could use have the controller return a partial view that I simply replace inside a container on the page.

我是新来的ASP.NET MVC的世界,所以我很有兴趣听取意见和其他替代品也是如此。

I'm new to the ASP.NET MVC world, so I'd be interested in hearing opinions and other alternatives as well.

你会如何去这样做?

我也有兴趣听取关于使用Ajax运行良好的jQuery插件表

I'm also interested in hearing about jquery table plugins that work well with Ajax.

推荐答案

这里有几个选项来结帐:

Here are a few options to checkout:

  • jQuery Flexigrid
  • Yahoo DataTable
  • Ext JS

我倾向于雅虎的解决方案,自动取款机,因为它提供的不仅仅是一个网格控件等等。

I'm leaning towards Yahoo's solution atm since it offers much more than just a grid control.

这篇关于在ASP.NET MVC和AJAX分页表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆