Jump to content

Unidblookpupcombobox problem


erguti63
 Share

Recommended Posts

My suggestion is to describe your problem in complete detail.

ok, I'll try to describe the problem. I have a form with a Tibquery called "qrycolor" with "select _key, color by color order from Color," with an associated TDatasource called "dscolor" a Tunidblookupcombobox called "combocolor" and properties Listsource = Dscolor,Listfield = Color and KeyField = _Key.

In the event of the form Uniformcreate run qrycolor.open , when clicked on Unidblookupcombobox, displays, but only displays one record.

I apologize for my bad English, I hope I have understood and can help me

Thanks in advance.

Link to comment
Share on other sites

  • Administrators

ok, I'll try to describe the problem. I have a form with a Tibquery called "qrycolor" with "select _key, color by color order from Color," with an associated TDatasource called "dscolor" a Tunidblookupcombobox called "combocolor" and properties Listsource = Dscolor,Listfield = Color and KeyField = _Key.

In the event of the form Uniformcreate run qrycolor.open , when clicked on Unidblookupcombobox, displays, but only displays one record.

 

Thanks for info.

 

Can you specify your uniGUI version?

Link to comment
Share on other sites

  • Administrators

Problem is related to IBQuery which doesn't fully fetch all records. uniGUI needs to know number of records in advance. (RecordCount)

 

Workaround:

 

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  bdprincipal.Open;
  ibvehiculos.Open;
  qrycolor.Open;
  qrycolor.Last; //<-------- added
  qrymarcas.Open;



end;

Link to comment
Share on other sites

Problem is related to IBQuery which doesn't fully fetch all records. uniGUI needs to know number of records in advance. (RecordCount)

 

Workaround:

 

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  bdprincipal.Open;
  ibvehiculos.Open;
  qrycolor.Open;
  qrycolor.Last; //<-------- added
  qrymarcas.Open;



end;

Thanks, I'll try.

Link to comment
Share on other sites

Thanks, it works perfectly ... now I get another problem, when I select a record brings me back to the code assigned to the target field is not valid .. any suggestions?

I have found that the value stored in DataField is not KEYFIELD property, it saves Listfield property.

The dblookupcombobox is integrated in the property editor of the dbgrid.

Thanks in advance

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.

 Share

×
×
  • Create New...