Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何有条件地隐藏/显示 jqgrid 的添加/编辑表单?我尝试了以下方法:
afterShowForm:function(formid) { jQuery('form#'+formid).hide(); jQuery('.jqmOverlay').hide(); }
我不建议您在某些情况下隐藏表单。用户将单击“添加”或“编辑”按钮,但什么也没有发生?我认为这可能是对用户的误解。
取而代之的是,您可以禁用/启用或隐藏/显示一些编辑按钮navGrid。答案演示(参见旧演示)如何有条件地启用/禁用按钮。另一个答案(参见演示)显示了如何显示/隐藏navGrid.
navGrid