Setting readonly column in a LIst SPDataTable control

Hi,

After searching the different topics, I did not really found what I wanted to implement.

I have a display form where I inserted a SPDataTable control linked to a library. This library has some custom columns. Some of them are just information column and should not be editable, others could be edited by users.

I found a way to disable specific column with this code:
fd.control('SPFichiersLivrable').$on('edit', function(editData) {
editData.field("Archived").disabled=true;
});

But when the user edit inline the row, the readonly column still appear with an editable (switch) control..even if is disabled. I would want in place that the "displayed" view of this control would be displayed as text even when editing inline mode.

Here the column is a boolean Yes/No column. So I would want to display when in edit inline mode the value (Oui or Non as I am in french locale) as it is shown in non edit mode in place of the grayed disable switch control that indicates OFF or ON (and that I do not see haw I could changed the texte as Oui or Non)

Regards.

Hello @educos35,

The easiest is to create a calculated column to display the value of the Yes/No field and add it to the list view.