Ad
How To Force The Update Of Radio Buttons In Webix Datatable
Is there a way to force the update for each change of the radio buttons in Webix datatable?
I have a datatable like
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/
But I don't have a clue how to do this.
Ad
Answer
You can use onCheck event to add some reaction for radio input clicking
Something like next
webix.ui({
view:"datatable",
on:{
onCheck:function(id){
//do something
//next line triggers default data saving logic
webix.dp(this).save(id);
}
}
});
Ad
source: stackoverflow.com
Related Questions
- → How to update data attribute on Ajax complete
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → Octobercms Component Unique id (Twig & Javascript)
- → Passing a JS var from AJAX response to Twig
- → Laravel {!! Form::open() !!} doesn't work within AngularJS
- → DropzoneJS & Laravel - Output form validation errors
- → Import statement and Babel
- → Uncaught TypeError: Cannot read property '__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED' of undefined
- → React-router: Passing props to children
- → ListView.DataSource looping data for React Native
- → Can't test submit handler in React component
- → React + Flux - How to avoid global variable
- → Webpack, React & Babel, not rendering DOM
Ad