簡體   English   中英

如何在Webix數據表中強制更新單選按鈕

[英]How to force the update of radio buttons in Webix datatable

有沒有一種方法可以強制對Webix數據表中單選按鈕的每次更改進行更新?

我有一個數據表

var list = [{ 
  id:1, user:"", mail:"", rad:''
}, { 
  id:2, user:"", mail:"", rad:''
}, { 
  id:3, user:"", mail:"", rad:''
}, { 
  id:4, user:"", mail:"", rad:''
}, { 
  id:5, user:"", mail:"", rad:''
}]; 


webix.ui({  
  view:"datatable",
  data:list,
  columns:[{ 
    id:"ra1", header:"", template:"{common.radio()}", width:50
  }, { 
    id:"user",  sort:"string", header:"Name", adjust:true
  }, {
    id:"mail",  editor:"text",      header:"E-mail" , adjust:true
  }]
});

https://jsfiddle.net/9covejnt/2/

但是我不知道如何執行此操作。

您可以使用onCheck事件為單選輸入單擊添加一些反應

下一個

webix.ui({  
  view:"datatable",
  on:{
    onCheck:function(id){
      //do something 
      //next line triggers default data saving logic
      webix.dp(this).save(id);
    }
  }
});

https://jsfiddle.net/9covejnt/3/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM