Make a Dropdown selection box read only in edit dialog

QuestionsMake a Dropdown selection box read only in edit dialog
Richard Samson asked 1 year ago

Hi Folks,
Is it possible to make the dropdown selection box read only in the edit dialog, but work normally within the add new record dialog?  I’d like my users to be able to add new records, but once added not be able to edit the drop down column.  The column needs to be visible within the edit dialog but locked so it can’t be changed.
Alternatively, is it possible to show virtual columns within the edit dialog?

1 Answers
Abu Ghufran Staff answered 1 year ago

You can also set certain column as readonly on edit dialog, and editable on add dialog.
$col[“editrules”][“readonly”] = true;
Creating a new virtual column is also doable, and display it only on edit dialog.

Abu Ghufran - Dev Team
PHP Grid Framework
Richard Samson replied 1 year ago

Thanks. The first option worked fine, not sure how I missed that.

Ref the virtual column, I still can’t get that one to show in the edit dialog unless I set editable=true, but as soon as I do that I receive SQL errors when updating the record as the field doesn’t exist in the target table.

Your Answer

6 + 9 =

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating / 5. Vote count:

We are sorry that this post was not useful for you!

Let us improve this post!