網格

2012-03-21 48 views
0

嗨,我想在電網 添加組件添加組件我嘗試這樣做 Rendering a component into an ExtJS grid 但我在細胞 和按鍵看到下網網格

我使用ExtJS的4

columns:[ 
     {header:"test", dataIndex:'registrationDate', width:30, renderer:function (value, id, r) { 
      var id = Ext.id(); 
      new Ext.Button({ 
       text:"1", handler:function (btn, e) { 
        // do whatever you want here 
       } 
      }).render(document.body, id); 

      return('<div id="' + id + '"></div>'); 
     }} 
    ], 
+1

是什麼問題? – dbrin 2012-03-21 18:52:52

回答

0

如果您只需要列中使用click處理按鈕的按鈕使用動作列xtype。