2016-07-19 46 views
0

這是一件我的js文件如何使用視圖來編輯webix選擇字段:「組合」?

我怎樣才能forbit編輯webix使用視圖中選擇字段:「二合一」?使用視圖:「選擇」不是一個選項。

rows: [   { 
        borderless: true, 
        css: "font_bold", 
        height: 35, 
        template: displayContent 
        }, 
        { 
        view: "combo", 
        id: "myId", 
        tooltip: somevalue, 
        value: someid, 
        options: contactListOptions, 
        on: { 
        ------ 
        } 

回答

0

their forum

提到類似的問題,我測試了一下 - 好像它仍然以同樣的方式,所以下面的解決方法是相關的:

/* if readonly set to true */ 
    suggest:{   
    on:{ 
     onBeforeShow:function(){ 
     var parent = $$(this.config.master); 
     if (parent.config.readonly) 
      return false; 
     } 
    },  
    body:{ 
     on:{ 
     onBeforeSelect:function(){ 
      var parent = $$(this.getParentView().config.master);   
      if (parent.config.readonly)    
      return false; 
     } 
     } 
    }, 
    data:combo_data, 
    } 
0

而且,您可以使用richselect編輯器,其行爲與組合相同,但不允許編輯操作。

{ 
    view: "richselect", 
    id: "myId", 
    tooltip: somevalue, 
    value: someid, 
    options: contactListOptions, 
    on: { /**/ } 
} 
相關問題