Jump to content

OnValidade UniDbEdit


diegojmap

Recommended Posts

I'm testing the OnValidade ClientDataSet event, this code:

TUniMainModule.ClientDataSet1CODIGOValidate procedure (Sender: TField);
begin
  ClientDataSet1DESCRICAO.clear;

  if ClientDataSet1CODIGO.AsString = '01' then
    ClientDataSet1DESCRICAO.AsString: = 'first';

  if ClientDataSet1CODIGO.AsString = '02' then
    ClientDataSet1DESCRICAO.AsString: = 'Second';

 if ClientDataSet1CODIGO.AsString = '03' then
    ClientDataSet1DESCRICAO.AsString: = 'Third';

 if ClientDataSet1CODIGO.AsString = '04' then
    ClientDataSet1DESCRICAO.AsString: = 'Room';

 if ClientDataSet1CODIGO.AsString = '05' then
    ClientDataSet1DESCRICAO.AsString: = 'Fifth';

 if ClientDataSet1CODIGO.AsString = '06' then
    ClientDataSet1DESCRICAO.AsString: = 'Sixth';

 if ClientDataSet1CODIGO.AsString = '07' then
    ClientDataSet1DESCRICAO.AsString: = 'Seventh';

  if ClientDataSet1CODIGO.AsString = '08' then
    ClientDataSet1DESCRICAO.AsString: = 'Eighth';


  if ClientDataSet1CODIGO.AsString = '09' then
    ClientDataSet1DESCRICAO.AsString: = 'new';

  if ClientDataSet1DESCRICAO.AsString = '' then
    begin
      MainForm1.MessageDlg ( 'Invalid Code', mtInformation [mbOK]);
      abort;
    end;
end;


The problem is that the type 0, it triggers the event, have some form of so trigger the event when I give Tab or Enter?

Version 0.99.0.1169 Tryal



 

Link to comment
Share on other sites

  • 5 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...