Hello Is it possible with a setting to easily make an entire grid read only? Only want to allow readonly access based on user permissions. thanks Tony
You can try setting:
$opt[“readonly”] = true;
Let me know if you mean something else.
I have tried this and the grid/fields/content are still editable unfortunately. I am looking for a way to make all fields readonly/uneditable on a page but still allow the autofilters, overall filtering, sorting and exporting to still work.
Sort of like protecting a page and allowing some visitors to only be able to view, filter, sort and export.
Just wanted to let you know that I figured out a solution for those who are interested.
I set two variables called $useraccess and $readonlyvar based on user permissions for a page. I set the pages actions with $useraccess and each field’s “editrules readonly” parameter with the $readonlyvar variable. When the user accesses a page, if they only have permissions as a readonly user, many features will be hidden from them and each field will only be readonly/uneditable and appear as text in each field.” They still have the ability to filter, sort, view, advanced filter, export, etc.
“inline”=>true, // allow/disallow inline
“add”=>$useraccess, // allow/disallow add
“edit”=>$useraccess, // allow/disallow edit
“delete”=>$useraccess, // allow/disallow delete
“rowactions”=>true, // show/hide row wise edit/del/save option
“export_excel”=>true, // export excel button
“bulkedit”=>$useraccess, // allow/disallow edit
//”export_pdf”=>true, // export pdf button
“export_csv”=>true, // export csv button
“autofilter” => true, // show/hide autofilter for search
“showhidecolumns” => true, // show/hide columns
“search” => “advance”, // show single/multi field search condition (e.g. simple or advance)
“import” => $useraccess,
“clone”=>$useraccess // allow/disallow clone
$col[“editrules”] = array(“required”=>true,”readonly”=>$readonlyvar); // and is required
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?