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

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

问题描述

我有兴趣使用jQuery dataTable ...
你可以告诉我,并给我一个例子,如何使用,我已经听说过jqGrid了,这是更好的两个?



我一直在尝试下载dataTable ..

  < script type =text / javascriptsrc =jquery.dataTables.js>< / script> 
< script type =text / javascript>
$(document).ready(function(){
$('#showdata')。dataTable({
//我必须填写这个区域?
}) ;
});
< / script>


解决方案

我已经尝试了两个并决定使用 datatables 。我发现它具有更好的文档,更好的社区支持,更简单的开始和使用这个插件。



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

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

(mind thead tbody



那么你的例子应该生成漂亮的datatable。有许多参数可以自定义,但是可以使用它们。



您还应考虑如果要根据以下方式生成datatable:


  1. 静态html内容(加载一次)

  2. 从您的服务器收到的内容



    1. 这两个选项都可以使用数据表,并且在 datatables.net



      如果有任何问题,请删除详细信息。


      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>
      

      解决方案

      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.

      Basically if you have html code like this:

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

      (mind thead and tbody)

      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. static html content (load once)
      2. content received from your server

      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天全站免登陆