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

Comments

  • 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:
    - create a column for each field
    - insert a radio into each column (might be used custom radio)
    - add logic which would leave only one check radio
    Please check an example of how this could be done:
    https://snippet.webix.com/izyn5qcf

  • Thanks :)

    Great example ;) 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 :) thanks

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!