• jqGrid 问题笔记 .


    http://blog.csdn.net/alinaxz/article/category/845388

    Custom edit
     
    Actions
     
    Inv No
     
    Date
     
    Client
     
    Amount
     
    Tax
     
    Total
     
    Notes
     
                   
    13
    12
    11 2007-10-06 Client 1 600.00 120.00 720.00  
    10 2007-10-06 Client 2 100.00 20.00 120.00  
    9 2007-10-06 Client 1 200.00 40.00 240.00  
    8 2007-10-06 Client 3 200.00 0.00 200.00  
    7 2007-10-05 Client 2 120.00 12.00 134.00  
    6 2007-10-05 Client 1 50.00 10.00 60.00  
    5 2007-10-05 Client 3 100.00 0.00 100.00 no tax at all
    4 2007-10-04 Client 3 150.00 0.00 150.00 no tax
     
          Page of 2      
    View 1 - 10 of 13



    <!--StartFragment-->jQuery("#rowed2").jqGrid({
       url:'server.php?q=3',
    datatype: "json",
       colNames:['Actions','Inv No','Date', 'Client', 'Amount','Tax','Total','Notes'],
       colModel:[
    {name:'act',index:'act', 75,sortable:false},
       {name:'id',index:'id', 55},
       {name:'invdate',index:'invdate', 90, editable:true},
       {name:'name',index:'name', 100,editable:true},
       {name:'amount',index:'amount', 80, align:"right",editable:true},
       {name:'tax',index:'tax', 80, align:"right",editable:true},
       {name:'total',index:'total', 80,align:"right",editable:true},
       {name:'note',index:'note', 150, sortable:false,editable:true}
       ],
       rowNum:10,
       rowList:[10,20,30],
       pager: '#prowed2',
       sortname: 'id',
        viewrecords: true,
        sortorder: "desc",
    gridComplete: function(){
    var ids = jQuery("#rowed2").jqGrid('getDataIDs');
    for(var i=0;i < ids.length;i++){
    var cl = ids[i];
    be = "<input style='height:22px;20px;' type='button' value='E' onclick=\"jQuery('#rowed2').editRow('"+cl+"');\"  />";
    se = "<input style='height:22px;20px;' type='button' value='S' onclick=\"jQuery('#rowed2').saveRow('"+cl+"');\"  />";
    ce = "<input style='height:22px;20px;' type='button' value='C' onclick=\"jQuery('#rowed2').restoreRow('"+cl+"');\" />";
    jQuery("#rowed2").jqGrid('setRowData',ids[i],{act:be+se+ce});
    }
    },
    editurl: "server.php",
        caption:"Custom edit "
    });
    jQuery("#rowed2").jqGrid('navGrid',"#prowed2",{edit:false,add:false,del:false});

    每一天都要行动,在前进中寻求卓越。
  • 相关阅读:
    JVM系列三:JVM参数设置、分析
    JVM系列二:GC策略&内存申请、对象衰老
    HotSpot VM GC 的种类
    2.静态库和动态库
    1.GCC编译过程
    6.树
    5.队列
    4.栈
    3.线性表
    2.算法
  • 原文地址:https://www.cnblogs.com/wshsdlau/p/2868881.html
Copyright © 2020-2023  润新知