Your wish is my command

whitekid's blog

TValueListEditor OnValidate

with one comment

TValueListEditor에서 입력한 값을 Validation하려고 봤더니 Validate에 뭔가 이상합니다. OnValidate 이벤트에 성공/ 실패가 있을줄 알았더니만 없네..

그래서 OnValidate에 아래처럼하고

procedure TValueListEditorForm.ValueListEditor1Validate(Sender: TObject; ACol,
  ARow: Integer; const KeyName, KeyValue: string);
begin
  if Trim(KeyValue) = '' then
    FValidateFailed := True;
end;

선택을 못하게.. ㅋㅋ

procedure TValueListEditorForm.ValueListEditor1SelectCell(Sender: TObject; ACol,
  ARow: Integer; var CanSelect: Boolean);
begin
  if FValidateFailed then
  begin
    CanSelect := False;
    FValidateFailed := False;
  end;
end;

Written by whitekid

June 30th, 2010 at 4:05 pm

Posted in Uncategorized

Tagged with

One Response to 'TValueListEditor OnValidate'

Subscribe to comments with RSS or TrackBack to 'TValueListEditor OnValidate'.

  1. I think you have noted some very interesting details , regards for the post.

Leave a Reply