How to disable cells which are expanded due to tree table structure ?

Hi ,

I have a treetable structure with last column as 'Remarks' , I want only the first cell of each entry/row for the Remarks column should be edited and rest should be disabled.

When the tree node of 'info' column is expanded , it also expands the 'Remarks' column. I want only one Remark per No. or Name column to be entered.

How can I ensure that ?

Snippet : https://snippet.webix.com/6v6y3s6p

Tagged:

Comments

  • edited December 2018

    Hi,

    You can block editing for the "Remarks" column based on a tree node level:

    on:{
        onBeforeEditStart:function(id){
          if(id.column =="id3" && this.getItem(id).$level >1){
            return false;
          }
        }
     }
    

    where item.$level property stores the hierarchy level, while returning false in before- handlers prevents from the subsequent operations (editing in particular).

    Here's the snippet: https://snippet.webix.com/psx4v6d5

  • Hi Helga,

    I am sorry, I did not think it necessary to mention that I already have onBeforeEditStart function where I am checking some users permission whether he has authorization to edit that cell or not and returning true/false accordingly.

    Is there a way to handle this extra true/false to disable cells based on $level ?

    Thanks

  • Thanks Helga, I could implement it.

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!