Datatable interaction between radio button and disable row

Hello , I have a datatable with checkbox and radios buttons :

https://snippet.webix.com/1soln8j0

How it possible to disable rows when checkbox isn’t checked and enable row when I click on checkbox ?
For the moment I have a custom disabled (how to disable radio button ?) but I wish to really disable row except “enabled” column.

And how it possible to have “toggle” mode by rows for radio button (when I click on radio1 in row , radio2 become unchecked and vice versa) ?

Thanks

Hello @romain ,

How it possible to disable rows when checkbox isn’t checked and enable row when I click on checkbox ?

As a solution you can make use of datatable onCheck event and add CSS for cells that should be disable.

And how it possible to have “toggle” mode by rows for radio button (when I click on radio1 in row , radio2 become unchecked and vice versa) ?

Here’s the way to do it:

Thanks :slight_smile:

Great example :wink: but how it possible to have “disabled css” on init if “chk” is set to 0 ?
I tried to had $cellCss on data with “css disabled” but in this way it works on init but not when I click in disabled element

https://snippet.webix.com/xswq1cqq

In your case you can use ready handler function and eachRow method to iterate data to define CSS style for cells:
https://snippet.webix.com/dresuyxt

Perfect :slight_smile: thanks

Hello , I come back in this ticket , because this way to write "

states.forEach(state=>{
obj[state] = (state == “nonelevel”) ? true : false;
});
" doesn’t support by IE11 :frowning:

Any ideas ?

@romain
IE does not support arrow functions.
try to use classic

states.forEach(function(state){
    obj[state] = (state == "nonelevel") ? true : false;
});