Hi
i want to extend the meaning of the editoption readonly. Currently there will be only a inputfield, which is disabled. I don't like this behabiour of the jqgrid here.
If i set editable=true and readonly=true the values of these colums will be transfered to the server after storing a record, but there is always a disabled input box visible and that is realy confusing for a user.
I did the following changes to the files to prevent the grid to display input fields:
jqGrid\js\grid.inlinedit.js(31): if ( nm !== 'cb' && nm !== 'subgrid' && $t.p.colModel.editable===true && !($t.p.colModel.editoptions && $t.p.colModel.editoptions.readonly === true) && !hc) {
jqGrid\js\grid.inlinedit.js(78): if( $t.p.colModel.hidden===true || ($t.p.colModel.editoptions && $t.p.colModel.editoptions.readonly === true)) { tmp[nm] = $(this).html(); }
jqGrid\js\grid.formedit.js(433): if((obj.p.colModel.editrules && obj.p.colModel.editrules.edithidden == true) || (obj.p.colModel.editable===true && obj.p.colModel.editoptions && obj.p.colModel.editoptions.readonly === true)) {
jqGrid\js\grid.formedit.js(478): if((obj.p.colModel.editrules && obj.p.colModel.editrules.edithidden === true) || (obj.p.colModel.editable===true && obj.p.colModel.editoptions && obj.p.colModel.editoptions.readonly === true)) {
jqGrid\js\grid.celledit.js(64): if ($t.p.colModel[iCol].editable===true && !($t.p.colModel[iCol].editoptions && $t.p.colModel[iCol].editoptions.readonly === true) && ed===true) {
jqGrid\js\grid.celledit.js(287): if ( $t.p.colModel.editable ===true && !($t.p.colModel.editoptions && $t.p.colModel.editoptions.readonly === true)) {
jqGrid\js\grid.celledit.js(307): if ( $t.p.colModel.editable ===true && !($t.p.colModel.editoptions && $t.p.colModel.editoptions.readonly === true)) {
I testet the changes in the files for the inline editing. Form- and cellediting is untestet till now, but it should work.
Kind Regards
Markus
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top