zoukankan      html  css  js  c++  java
  • 关于ligerui grid 行内编辑 combobox 只能选择的问题

    这个貌似是天然的不支持,修复方案,在ligerGridOrd.js中添加一行代码,如下,跟了一下午的源码,发现在这里的时候,options中只保留了combobox中的一部分属性,所以可能combobox中的很多东西都用不了了。这段代码大约在271行的位置,如果你没有引用ligerGridOrd.js,那就去ligerui.all.js找找看,应该也会有。

    $.ligerDefaults.Grid.editors['select'] =
         $.ligerDefaults.Grid.editors['combobox'] =
         {
             create: function (container, editParm)
             {
                 var column = editParm.column;
                 var input = $("<input type='text'/>");
                 container.append(input);
                 var options = {
                     data: column.editor.data,
                     slide: false,
                     valueField: column.editor.valueField || column.editor.valueColumnName,
                     textField: column.editor.textField || column.editor.displayColumnName,
                     autocomplete: column.autocomplete//修复combobox不支持手动输入的问题
                 };
                 var ext = column.editor.p || column.editor.ext;
                 if (ext)
                 {
                     var tmp = typeof (ext) == 'function' ?
                     ext(editParm.record, editParm.rowindex, editParm.value, column) : ext;
                     $.extend(options, tmp);
                 }
                 input.ligerComboBox(options);
                 return input;
             },
             getValue: function (input, editParm)
             {
                 return input.liger('option', 'value');
             },
             setValue: function (input, value, editParm)
             {
                 input.liger('option', 'value', value);
             },
             resize: function (input, width, height, editParm)
             {
                 input.liger('option', 'width', width);
                 input.liger('option', 'height', height);
             },
             destroy: function (input, editParm)
             {
                 input.liger('destroy');
             }
         };

    ps:就这一行代码,找了我两天,太痛苦了。。

  • 相关阅读:
    java 流重定向
    Linux下用鼠标滚轮
    AutoPager的简单实现
    App Store Review Guidelines ——苹果大慈大悲啊
    利用CSS3特性巧妙实现漂亮的DIV箭头
    Have you read it before?
    Windows Phone 7上的GPS应用编程详解。
    说一下Path类
    远程截取屏幕内容
    争论VB.NET与C#哪个好?——智商低下的举动
  • 原文地址:https://www.cnblogs.com/baiyunchen/p/4816549.html
Copyright © 2011-2022 走看看