Отдельный richselect для ячейки в datatable

Здравствуйте

Есть ли возможность rishselecteditor для отдельной якейки/ячеек в зависимости от значения в ней.
Причем для других ячеек в строке он не должен вызываться.

Добрый день,

В данном случае вполне хватит события onBeforeEditStart, с помощью которого можно предотвратить редактирование ячейки в соответствии с предоставленным условием. К примеру, можно получить запись, которую мы собираемся редактировать, и проверить, соответствует ли она нашему условию, если нет, то мы предотвращаем редактированием посредством return false.

Приблизительно это выглядит подобным образом: https://snippet.webix.com/p9d1qste. В данном примере мы проверяем записи по полю year, если значение больше 1980, то тогда можно редактировать ячейку.


Hey @becohar, this is possible to do with the help of a onBeforeEditStart event, which will allow us to prevent cell editing if the certain criteria are not met. This is achieved by returning false inside of the event handler (since it is triggered before the actual editiing starts). You are also getting returned the position of the currently to-be-edited item, which allows you you to get that item via getItem method and check whether it meets your conditions or not.

The end result would look something like this: https://snippet.webix.com/p9d1qste. Here we are checking for the year value, and are only allowing the editing if the year exceeds 1980.