Dynamically set columns on readonly

Hi,

I have a Handsontable with an complicated column definition. There are several types of users. Depending on the type of user, columns are read only or not. During defining the columns I tried to set the readOnly property with an function. But this doesn’t work. Here is an example:

var defColumns = [
{ data: ‘ID’ },
{
data: ‘EmptyField’,
readOnly: colReadOnly(cintDelete)
},
{
data: ‘Status’,
type: ‘dropdown’,
source: getValues(‘HiddenField_StatusValues’),
strict: true,
readOnly: colReadOnly(cintStatus)
}
];

How can this be done?

With regards,

Paul

Hi,

I found the solution myself. The function I used does’t return a boolean. I fixed it now it works.

With regards,

Paul

Thank you for an update.

I guess that we can close the topic.