开发者

ComboBox as a cell in TreeGrid of Ext-GWT

I want to render ComboBox for in a cell of all leaf nodes in TreeGrid.can any one help me regarding this ? .Im not able to figure it out .

Thanks, Bhaswanth Gatt开发者_如何转开发ineni .


There are some examples in Sencha overivew.

Treegrid with button example http://www.sencha.com/examples/#widgetrenderertreegrid

Replace button widget with combobox, in renderer check if node is a leafnode;

 ColumnConfig name = new ColumnConfig("name", "Name", 100);  
    name.setRenderer(new WidgetTreeGridCellRenderer<ModelData>(){  
      @Override  
      public Widget getWidget(ModelData model, String property, ColumnData config, int rowIndex, int colIndex,  
          ListStore<ModelData> store, Grid<ModelData> grid) {  
        final SimpleComboBox<String> combo = new SimpleComboBox<String>();  
         combo.setForceSelection(true);  
         combo.setTriggerAction(TriggerAction.ALL);  
         combo.add("aaaaa");    
         return combo;
     }  
    });  

Treegrid with textfield example

http://www.sencha.com/examples/#roweditortreegrid

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜