AnyColumn选项在Dojo增强型网格视图中作为新列添加

AnyColumn选项在Dojo增强型网格视图中作为新列添加,dojo,Dojo,我正在开发dojo增强的网格视图。我能够在UI中显示网格。但是AnyColumn选项被添加为新列 例如: 任何帮助都将不胜感激…… 这是密码 var mygrid = new EnhancedGrid({ id: "grid", store: gridStore, //Data store passed as input structure: gridStructure, //Column structure passed as input autoHeight

我正在开发dojo增强的网格视图。我能够在UI中显示网格。但是AnyColumn选项被添加为新列

例如:


任何帮助都将不胜感激……

这是密码

var mygrid = new EnhancedGrid({
    id: "grid",
    store: gridStore, //Data store passed as input
    structure: gridStructure, //Column structure passed as input
    autoHeight: true,
    autoWidth: true,
    initialWidth: width,
    canSort : true,
    plugins: {
        filter: {
          //Filter operation
          isServerSide: true,
          disabledConditions : {"anycolumn" : ["equal","less","lessEqual","larger","largerEqual","contains","startsWith","endsWith","equalTo","notContains","notEqualTo","notStartsWith","notEndsWith"]},
          setupFilterQuery: function(commands, request){
              if(commands.filter && commands.enable){
                  //filter operation
                }
              }
            }
}, dojo.byId("mydatagrid"));   


mygrid.startup();
谢谢,
首先,不要使用EnhancedGrid,而是使用dgrid或gridx

我认为默认情况下,下拉列表中添加了anycolumn。如果你想移除,我建议

  • 注册过滤器定义上的单击事件
  • 遍历下拉列表并删除第一个条目anyColumn
  • 或者你也可以试试类似的东西

    dojo.forEach(this.yourgrid.pluginMgr.getPlugin('filter').filterDefDialog._cboxes, function(dropdownbox) {
    
    dropdownbox._colSelect.removeOption(dropdownbox.options[0]);
    });
    
    最新的答案是。我知道这不是一个优雅的方式,但它的工作

    //reason why I'm showing the dialog is that _cboxes of the filter are empty initially.
        dijit.byId('grid').plugin('filter').filterDefDialog.showDialog();
    dojo.forEach(dijit.byId('grid').pluginMgr.getPlugin('filter').filterDefDialog._cboxes, function(dropdownbox) {
    
              var theSelect = dropdownbox._colSelect;
              theSelect.removeOption(theSelect.options[0]);
              });
    
    //Closing the dialog after removing Any Column
              dijit.byId('grid').plugin('filter').filterDefDialog.closeDialog(); 
    

    请发布代码并内联图像谢谢Marged…添加了代码,你能在这方面提供帮助吗。谢谢manjunatha muniyappa…你的代码对我不起作用。它没有删除anycolumn。@李珊斯,我想看看你是如何使用我之前的建议(代码)的。因此,请张贴完整的代码。如果可能的话,发布jsfiddle链接,以便于测试和调试…感谢您的回复…这是我在上面与您一起发布的jsfiddle…@Lishanth,我编辑了答案以包含工作代码。请测试并让我知道