zoukankan      html  css  js  c++  java
  • 使用easyui实现双击列表中某个值直接对其进行修改

    var editCell = undefined;
    $('#dg').datagrid({
      url:'DwzServlet',
      iconCls:'icon icon-list' ,
      queryParams:{action:"list_member"},
      fitColumns:true,
      fit:true,
      loadMsg:'处理中,请稍候……',
      columns:[[
        {field:'F_GUID',title:'选择',checkbox:true,150,align:'center'},
        {field:'F_USERNAME',title:'成员名称',120,align:'left'},
        {field:'F_SEQUENCE',title:'成员顺序号',60,align:'center',editor:'numberbox'},
        {field:'F_SSJG',title:'上级机构',60,align:'center'}
      ]],
      onAfterEdit: function (rowIndex, rowData, changes) {
        $.post("DwzServlet",{action:'edit',guid:rowData.F_GUID,xh:rowData.F_SEQUENCE},function(str){
        editCell = undefined;
        });
      },
      onDblClickCell:function (rowIndex, field, value) {
        if (editCell != undefined) {
        $("#dg").datagrid('endEdit', editCell);
        }
        if (editCell == undefined) {
        $("#dg").datagrid('beginEdit', rowIndex);
        editCell = rowIndex;
        }
      },
      onClickRow:function(rowIndex,rowData){
        if (editCell != undefined) {
        $("#dg").datagrid('endEdit', editCell);
        }
      }
    });
    将要修改的值传到后台后,正常进行修改操作即可.

  • 相关阅读:
    视图,触发器,事物,储存过程,函数,流程控制
    mysql之其他
    web前端之html
    mysql之索引
    Android minHeight/Width,maxHeight/Width
    Android GridView(九宫图)
    Android padding和margin的区别
    android:scaleType属性
    android:visibility
    Android RelativeLayout常用属性介绍
  • 原文地址:https://www.cnblogs.com/nana-blog/p/5213064.html
Copyright © 2011-2022 走看看