博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
jqgrid 行编辑/单元格selsect 下拉框并运用select2
阅读量:7067 次
发布时间:2019-06-28

本文共 1245 字,大约阅读时间需要 4 分钟。

{name:"untivalue", index:"untivalue",hidden:true,width:0,classes:'untivalue'},{name:"itemname", index:"itemname", width:100,align:"center",editable: true,edittype:"select", editoptions:{value:  

  function(url){

    var html = ':;';
     ajax.get(url, function(data){
      for(i=0;i<data.length;i++){
        if(i != data.length - 1){
          html += data[i].value + ":" + data[i].name + ";";
        }else{
          html += data[i].value + ":" + data[i].name;
        }
      }
    })
    return html;
   }

, dataEvents:

      function(classes){

        var obj = [
          {
          type: 'change',
          fn: function(e) {
          var $this = this;
          

      function ($this,classes){

        var val = $this.value;
        $($this).closest('td').siblings('td.'+classes+'').html(val).attr('title',val)
      },

          }
          }
         ]
      return obj;
     },

}},

  

//单元格编辑

afterEditCell: function (rowId, cellname, value, iRow, iCol) {   

       bkcsubtable.afterEditCell_select() //应用select2样式

}

//行编辑

onSelectRow : function(rowId,status) {

  jQuery(RecordGrid).jqGrid('editRow', rowId, true); 

  if(status){

    bkcsubtable.afterEditCell_select() ; //应用select2样式
  }

}

转载于:https://www.cnblogs.com/x-g-a/p/9877628.html

你可能感兴趣的文章
ffmpeg中的时间
查看>>
Microsoft Visual Studio Ultimate 2013 with Update 3 CN+EN
查看>>
从数字油田的关键问题说开去
查看>>
[分享]Ubuntu12.04安装基础教程(图文)
查看>>
百度面试-网页搜索部
查看>>
HDU 3060 多边形面积并
查看>>
Map.EntrySet的使用方法
查看>>
【一】仿微信飞机大战cocos2d-x3.0rc1
查看>>
JavaScript 之 最佳位置选择
查看>>
使用TCMalloc优化OpenResty
查看>>
(HLS播放器之中的一个)HLS协议之M3U8解析
查看>>
GPRS管理与创建APN拨号连接(转)
查看>>
C语言标量类型(转)
查看>>
Linux下如何删除Oracle
查看>>
C# 读取Excel
查看>>
spring3.0事务的配置
查看>>
【原】使用StarUML画用例图
查看>>
[原]如何在Android用FFmpeg+SDL2.0之同步音频
查看>>
查看linux硬件信息
查看>>
USB移动硬盘WinPE启动盘的制作方法
查看>>