Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/89.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript ShieldUI网格-仅在插入时显示下拉列表_Javascript_Jquery_Ajax_Shieldui - Fatal编程技术网

Javascript ShieldUI网格-仅在插入时显示下拉列表

Javascript ShieldUI网格-仅在插入时显示下拉列表,javascript,jquery,ajax,shieldui,Javascript,Jquery,Ajax,Shieldui,我正在使用ShieldUI网格,希望网格上的新行在其中一列中显示下拉列表。此列不可编辑,显示文本。我希望用户能够从下拉列表中选择一个值,但添加后该值不可编辑。我已经多次查看了文档,但似乎无法理解它 $document.readyfunction{ $propertiesGrid.shieldGrid{ 主题:轻引导, 数据源:{ 远程:{ 阅读:{ url:/api+window.location.pathname+/ProductAttributes, 数据类型:json } }, 修改:{

我正在使用ShieldUI网格,希望网格上的新行在其中一列中显示下拉列表。此列不可编辑,显示文本。我希望用户能够从下拉列表中选择一个值,但添加后该值不可编辑。我已经多次查看了文档,但似乎无法理解它

$document.readyfunction{ $propertiesGrid.shieldGrid{ 主题:轻引导, 数据源:{ 远程:{ 阅读:{ url:/api+window.location.pathname+/ProductAttributes, 数据类型:json } }, 修改:{ 更新:functionitems、成功、错误{ $.ajax{ 类型:PUT, url:/api+window.location.pathname+/ProductAttributes, 数据类型:json, contentType:application/json, 数据:JSON.stringifyitems[0]。数据 }.成功,错误; } } }, 模式:{ 字段:{ attributeId:{path:attributeId}, productAttributeId:{path:productAttributeId}, productId:{path:productId}, attributeName:{path:attributeName}, 最小值:{路径:最小值}, 目标:{path:target}, 最大值:{路径:最大值}, 方法:{path:method} } }, rowHover:false, 调整大小:正确, 滚动:对, 活动:{ 插入:函数{AddNewRow} }, 编辑:{ 启用:对, 类型:row, insertNewRowAt:pagebottom }, 工具栏:[ { 按钮:[ {commandName:insert,标题:添加产品} ], 位置:底部 } ], 寻呼:{ 页面大小:10, PageLinkScont:12, 信息:{ infoBarTemplate:从{0}项到{1}项,共{2}, 第一个工具提示:第一页, 上一个工具提示:上一页, 下一页:下一页, 最后工具提示:最后一页 } }, 栏目:[ { 字段:attributeName, 标题:属性, 可编辑:false, id:attributeName }, {字段:最小值,标题:最小值}, {字段:目标,标题:目标}, {字段:最大值,标题:最大值}, {字段:方法,标题:方法}, { 宽度:150, 标题:, 按钮:[ {commandName:edit,caption:edit}, {commandName:delete,标题:delete} ] } ] };
}; 有一个变通办法。让列保持可编辑状态,只需绑定从网格抛出的编辑事件,找到该列的编辑器,然后将其隐藏或替换为单元格的值

events: {
    edit: function(e) {
        var target = $("#column_editor_id");
        target.hide();
    }    
},