I assigned OnClick.OnEvent of 'Post' button, and implemented the handler as following:
delphi code
//Post button
procedure TJQFrame1.IWCGJQNavigator1JQButtonSetOptionsButtons10Click(
Sender: TObject; AParams: TStringList);
begin
if DoValidate then begin
Query1.Post;
IWCGJQGrid1.JQGridOptions.ReloadGrid(True);
end
else
Exit;
end;
//private func.
function TJQFrame1.DoValidate: Boolean;
begin
JQEdtStoreCd.JQValidateOptions.Validate;
JQEdtStoreNm.JQValidateOptions.Validate;
JQEdtMaxCallCnt.JQValidateOptions.Validate;
Result := JQEdtStoreCd.JQValidateOptions.IsValid and
JQEdtStoreNm.JQValidateOptions.IsValid and
JQEdtMaxCallCnt.JQValidateOptions.IsValid;
end;
When Post button clicked, 'DoValidate' function returned 'True',
even if the text of the JQEdit violated the defined rules.
BTW, I tried to run 'DoValidate' function from JQButton.OnClick event handler,
then Validation executed properly(JQEdit was validated).
Is there anything wrong?