readonly on select field

Questionsreadonly on select field
Pavlos asked 4 years ago

Is it possible to make a lookup field to be readonly.

For the textboxes it dos it but on select fields i get the combobox and the vale next to it as label.

$grid[“edit_options”][“beforeInitData”]=”function(formid)
{
$(‘#mygrid’).jqGrid(‘setColProp’,’code’,{readonly:true});
$(‘#mygrid’).jqGrid(‘setColProp’,’image_’,{editable:true});
$(‘#mygrid’).jqGrid(‘setColProp’,’lookup_var1′,{editable:true});
}”;
$grid[“edit_options”][“afterShowForm”]=”function(formid)
{
$(‘#mygrid’).jqGrid(‘setColProp’,’code’,{readonly:false});
$(‘#mygrid’).jqGrid(‘setColProp’,’image_’,{editable:false});
$(‘#mygrid’).jqGrid(‘setColProp’,’lookup_var1′,{editable:true});
}”;

$col = array();
$col[“title”] = “Var’s Πελάτες”;
$col[“name”] = “lookup_var1”;
$col[“dbname”] = “print_prod_var3.lookup_var1”;
$col[“editable”] = false;
$col[“fixed”] = true;
$col[“width”] = “260”;
$col[“edittype”] = “lookup”;
$col[“editoptions”] = array(“table”=>”print_prod_var1”, “id”=>”id”, “label”=>”description”);
$col[“editrules”][“readonly”] = false;
$cols[] = $col;

Your Answer

15 + 9 =

Login with your Social Id:

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 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

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

Let us improve this post!

Tell us how we can improve this post?