Jump to content

Default value on a dblookupCombobox when dataset is in insert mode


franzandreani

Recommended Posts

Hi all

In delphi when i want to display a default value in a dblookupcombobox i do something like this

if datasouce.state = [dsInsert] then begin

   DBLookupComboBox1.ListSource.DataSet.Locate('id', '3', []);
   DBLookupComboBox1.ListSource.DataSet.FieldByName(DBLookupComboBox1.KeyField).Value;
   DBLookupComboBox1.keyvalue:=DBLookupComboBox1.listsource.dataset.fieldbyname(DBLookupComboBox1.keyfield).value
end;

but in uniGUI it does not shows point to the id i have selected as a default. 

Any Idea?

thank's a lot

 

Link to comment
Share on other sites

Hi Sherzod

making the test application for you I found that it works as expected - in the test app - so the code above works well. I have to find the reason why in the real application it does not work.

thank you for you support

francesco

  • Upvote 1
Link to comment
Share on other sites

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...