ui.Treetable - Change treetableConfig dynamically

edited November 2019 in Technical questions

I want to change treetableConfig.select: 'cell' to 'row' dynamically.
I tried this two way but it is not working....

myUiTreeTable.define('select', 'row');
myUiTreeTable.config.select = 'row';

Comments

  • edited November 2019

    Hello @JoGo,
    Unfortunately, it's not possible to change the selection mode of treeTable dynamically.
    During initialization, the table gets constant selection handlers. In general, we do not recommend to change them, but if you absolutely need this feature, it is possible to re-init the table with new selection mode.
    As a solution, you can create webix.copy() of treeTable and (for example,on onChange event) call extend method to mergewebix.copy(treetable) and {select:"row"} together.
    And then use webix.ui() constructor to redraw treeTable.
    Check the following snippet:
    https://snippet.webix.com/tpbcmzio

  • Ho cool.
    Big 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!