Can you please tell how can I enable/disable a cell based on the changed in its adjacent cell?
Hello,
You can catch the onBeforeEditStart
event, check the value of the adjacent cell in the handler and return false
if the editing operation should be blocked.
/*blocking editing for the "title" column
if "year" of the same item is bigger than 1970*/
on:{
onBeforeEditStart:function(id){
var item = this.getItem(id.row);
if(id.column ==="title" && item.year >1970)
return false;
}
}
Thanks for the response. However the solution that you have given does not seem to work in my case I want to show the checkbox cell as readonly if the dropdown value in next column does not matches some specific value.
For a checkbox editor you can solve this problem with the help of a template function: https://webix.com/snippet/344043d7
Thanks. it worked!
I want to hit server to know whether the cell is read only or not? how to achieve this? i mean: i want to ajax.post the current row details so that the server tells me whether the row can be editable or not. can someone guide me to achieve this?
the problem i’m facing is: by the time ajax returns, the onBeforeEditStart event finishes and loosing the control.
you can return false in onBeforeEditStart event and do editCell on ajax return.