0

I want to lock & unlock my jqGrid in page, but why it doesn't work: following shows how I do it now

$("#myGridName").attr('disabled', true);
$("#myGridName").attr('disabled', false);

does anyone can help me, thanks!

Sorry for my poor english……

Jayanga
  • 889
  • 6
  • 15
  • 1
    Possible duplicate of [How to make an entire jqGrid disabled/readonly](http://stackoverflow.com/questions/3206912/how-to-make-an-entire-jqgrid-disabled-readonly). – Frédéric Hamidi Mar 14 '12 at 07:08

1 Answers1

3

You don't clear define what you mean under "Lock" or "Unlock" if the jqGrid? Probably what you want is to block jqGrid during it loads the data from the server. In the case you can use the following option

loadui: "block"

If you need to block some more GUI elements on the page as the grid itself you can use blockUI plugin for example like Frédéric Hamidi mentioned you in his comment. See here and here some examples.

Alternatively you can just create a div having "ui-widget-overlay" class (see here) and show it over the part of the page which you want to block (see here).

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798