Disabling a JQGrid dropdown in an edit dialog form

2019-08-04 05:27发布

问题:

Does anyone know how through either javascript or jQuery know how to disable a select (dropdown) control within a jqGrid edit dialog form?

回答1:

Use dataInit event and do $(element).attr("disable", "disable") there. To make this happen everytime the form is shown, either set option to re-create form each time it is shown (by default it is created once), or try to set disabled in the afterShowForm event.