jqGrid 和 dataTable,哪个更好? [英] jqGrid or dataTable, which better?

查看:58
本文介绍了jqGrid 和 dataTable,哪个更好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有兴趣使用 jQuery 数据表...你能告诉我并给我一个如何使用它的例子..我也听说过 jqGrid..从他们两个中哪个更好?

i'm interest to use jQuery dataTable... could you tell me and give me an example how to use that..and i've been heard about jqGrid too..which better from both of them?

我一直在尝试下载数据表..

i've been try to download dataTable..

<script type="text/javascript" src="jquery.dataTables.js"></script>
<script type="text/javascript">
 $(document).ready(function() {
  $('#showdata').dataTable( {
 //what must i fill in this area?
});
});
</script>

推荐答案

我都试过了,决定使用 datatables.我发现它有更好的文档、更好的社区支持,而且启动和使用这个插件也更简单.

I've tried both and decided to use datatables. I found it has better documentation, better community support and it was more straightforward to start and use this plugin.

基本上,如果你有这样的 html 代码:

Basically if you have html code like this:

<table>
    <thead>
        <tr>...</tr>
    </thead>
    <tbody>
       <tr>...
    </tbody>
</table>

(mind theadtbody)

那么您的示例应该会生成不错的数据表.有很多参数可以自定义,但使用它们是可选的.

Then yours example should generate nice datatable. There are numbers of parameters to customize it but it is optional to use them.

您还应该考虑是否要基于以下内容生成数据表:

You should also consider if you want to generate your datatable based on:

  1. 静态 html 内容(加载一次)
  2. 从您的服务器收到的内容

这两个选项都可以用于数据表,并且在 datatables.net 上都有很多示例.

Both options are possible with datatables and both have many examples on datatables.net.

如有任何问题,请提供包含详细信息的信息.

In case of any problem drop an info with the details.

这篇关于jqGrid 和 dataTable,哪个更好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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