by Jorge Sousa » 19 Sep 2012 17:31
o sorry
For now you've to set a BrowserParam in the event you need to get
// FormCreate for instance
BrowserParam.BrowserServer:= 'SelRows';
BrowserParam.BrowserScript:= Grid1.JQGridOptions.jsGetSelArrrow; // The name is strange but is the original one
in the event you will receive AParams.Values['SelRows'] in a json format, array of rowids selected ["xyz","abc","etc"]
to work with json in Delphi we've choosen SuperObject @ http://www.progdigy.com/?page_id=6
uses
IWCGJSSuperObject;
procedure TframeMAIN_DIENSTE.IWCGJQGridJQGridCustomButtons0ClickButton(
Sender: TObject; AParams: TStringList);
var
SelRows: ISuperObject;
i: Integer;
RowId: string;
begin
SelRows:= SO(AParams.Values['SelRows']);
if not SelRows.IsType(stArray) then Exit;
for i:= 0 to SelRows.AsArray.Length-1 do
begin
RowId:= SelRows.AsArray.S[i];
end;
end;
A new property JQGridOptions.SelRows will be added soon, to perform this automaticallly
Regards
cgdevtools