【问题标题】:jqGrid Format Cell While You Type键入时 jqGrid 格式化单元格
【发布时间】:2015-04-30 01:27:52
【问题描述】:

是否可以将 jqGrid 配置为在您键入时允许格式化单元格。我正在尝试实现类似Money Mask jquery 库功能。

当用户在编辑单元格时输入价格值时,我希望单元格在键入时进行格式化。

【问题讨论】:

    标签: jqgrid jqgrid-formatter


    【解决方案1】:

    这最终基于Oleg 对单元格编辑中自动完成的回答而工作。

    colNames: ["Name", "Price"],
    colModel: [{
        name: "name",
        index: "name",
        },
        {
        name: "Price",
        index: "Price",
        editable: true,
        editoptions: {
            dataInit: function (elem) {
                $(elem).maskMoney();
                /*
                https://cdn.cdnhttps.com/cdn-libraries/jquery-maskmoney/3.0.2/jquery.maskMoney.min.js
                http://plentz.github.io/jquery-maskmoney/
                */
            }
        }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-06-17
      • 1970-01-01
      • 1970-01-01
      • 2013-11-29
      • 1970-01-01
      • 1970-01-01
      • 2010-10-20
      • 2016-06-26
      相关资源
      最近更新 更多