A.G.Progm.Enthusiast
A.G.Progm.Enthusiast

Reputation: 1010

How to allow edit action on specific cell in Webix datatable?

In my datatable I have onBeforeEditStart event through which I can decide giving edit action on a row based on some requirement, by returning true/false.

In addition with that I want a specific control to allow editing on the cells beneath 'Shade' column. When cells under 'Shade' column will be clicked , a specific check will be performed to allow edit action irrespective of the edit action on the cell under other two columns.

Snippet : https://snippet.webix.com/9x8cvb26

Is there a way to achieve that ?

Thanks

Upvotes: 0

Views: 738

Answers (1)

Aquatic
Aquatic

Reputation: 5144

You can use a complex logic in onBeforeEditStart handler, which can run different checks based on the column id

onBeforeEditStart:function(id){
    if (id.column === "shade"){
      console.log("shade specific check");
      return true;
    } else {
      console.log("common edit check");
      return true;
}

https://snippet.webix.com/dluu7pet

Upvotes: 1

Related Questions