When using gcfControl it would appear IWCGJQGrid1.JQGridOptions.SelRow is set AFTER the event for the embedded control is fired, making it, well... virtually unusable.
The code below results in display the of IWCGJQGrid1.JQGridOptions.SelRow from the previous click.
- Code: Select all
iCol:= IWCGJQGrid1.JQGridOptions.ColModel.Add;
iCol.Name := 'Select';
iCol.Caption := '';
iCol.Editable := False;
iCol.Sortable := False;
iCol.Width := 50;
iCol.Align:= gaCenter;
iCol.Sortable := False;
iCol.Formatter := gcfControl;
iCol.FormatOptionsControl.ControlTemplate := btnSelect;
procedure TformSelectProgram.btnSelectJQButtonOptionsClick(Sender: TObject;
AParams: TStringList);
begin
WebApplication.ShowMessage('Button click event: '+IWCGJQGrid1.JQGridOptions.SelRow);
end;
Thanks