I’m trying to allow users to export to CSV in read-only mode. Would seem to make sense that a user should be allowed to export since it is a read-only operation.
When I set the grid option to read-only, using:
$opt[“readonly”] = true;
Users can no longer export. That is, the export button has disabled.
Is there a way to re-enable exporting in read-only mode?
Thanks.
I’ve hacked this by editing the lib/inc/jqgrid_dist.php file, on line 1027 which start with:
if (isset($this->options[“readonly”]) && $this->options[“readonly”] === true)
It would be nice if there was an option to do this, though.
It’s added in dev line now and will be a part of next build.
Thanks for reporting.
I don’t have this issue. I only set-up add/edit/clone as-necessary.
I don’t use readonly = true in the Grid options, for me it’s not necessary as long as I set the Row-Actions section.
For me, reports are not read/write unless I set these options.
I then use the Read-only setting on a column-by-column basis if I only want some columns to be read/write.
Thanks
MIke
—————-8<—————————-
$g->set_actions(array(
“add”=>false,
“edit”=>false,
“clone”=>false,
“bulkedit”=>false,
“delete”=>false,
“rowactions”=>false,
“export_csv”=>true // export csv button
)
);