Page 1 of 1

how to make JQGrid Disabled

PostPosted: 25 Jul 2017 10:51
by fateh78
how to make JQGrid Disabled ?
i tried JQGrid.Enabled := False; but not work
i tried to disable the containing panel, also not work

urgent

Re: how to make JQGrid Disabled

PostPosted: 26 Jul 2017 11:52
by Jorge Sousa
The jqgrid plugin doesn't support the disable by definition.

You can use the following tweak in an async/ajax event:

Code: Select all
procedure DisableGrid(AGrid: TIWCGJQGrid);
var
  js: string;
begin
  js:= Format('$("#lui_%s").show();',[AGrid.JQHTMLName]);
  CGAddJavascriptToAjaxResponse(js);
end;

procedure EnableGrid(AGrid: TIWCGJQGrid);
var
  js: string;
begin
  js:= Format('$("#lui_%s").show();',[IWCGJQGrid1.JQHTMLName]);
  CGAddJavascriptToAjaxResponse(js);
end;


more info @

https://stackoverflow.com/questions/19809605/disable-entire-jqgrid