2017-07-03 7 views
0

私はdojo拡張グリッド・ビューで作業しています。私はUIのグリッドを表示することができます。ただし、AnyColumnオプションは新しい列として追加されます。Dojo拡張グリッド・ビューの新しい列としてAnyColumnオプションが追加されました

例: enter image description here


すべてのヘルプはここ

はおかげで、 Lishanth

+1

コードを投稿して画像をインライン化してください – Marged

+0

ありがとうございました...コードを追加しました。これを手伝ってください。 –

答えて

1

まず、使用していないコード

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がドロップダウンに追加されていると思います。あなたはその後、削除したい場合は、私がドロップダウンによるフィルタ定義

  • 反復のclickイベントのために

    1. 登録することをお勧めして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(); 
    
  • +0

    ありがとうmanjunatha-muniyappa ...あなたのコードは私のために働いていません。 anycolumnを削除していません。 –

    +0

    @Lishanth、コードを投稿できますか? –

    +0

    コードはすでに掲載されています... –

    関連する問題