Jump to content

Bug with unidblookupcombobox - second post


d.bernaert
 Share

Recommended Posts

Hello,

I'm still having a problem with unidblookupcombobox when using the mode umNameValue.

I have a unidblookupcombobox filled with customers with the mode umNameValue to be sure that the correct customer is selected.

I also have a trigger on the unidblookupcombobox that allow the user to create a new customer if not present in the list.

When the user clicks the button to create a new customer, he gets a popup where he can create the customer.

When returning, in the callback I refresh the list linked to the unidblookupcombobox to have the new customer included in the list.

When selecting the new customer, I always get index out of bounds.

I don't have it when using mode umNameOnly.

Anybody?

Link to comment
Share on other sites

Hi,

thank you for your answer, but it does not seems to solve the issue.

I've tried with the following code (removed the datasource and the listsource just to be sure) in the callback but I still get index out of bounds.

procedure TQuotesAddFrm.CallBackInsertUpdateAccount(Sender: TComponent; AResult: Integer);
begin
  if CrmAccounts.Active
  then begin
         ComboAccount.DataSource := nil;
         ComboAccount.ListSource := nil;
         CrmAccounts.Refresh;
         ComboAccount.ListSource := DsCrmAccounts;
         ComboAccount.DataSource := DsHeaderWork;
         if UniMainModule.Result_dbAction <> 0
         then UniFinancialModule.HeaderWork.FieldByName('Account').AsInteger := UniMainModule.Result_dbAction;
       end;
end;

Link to comment
Share on other sites

  • 2 weeks 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.

 Share

×
×
  • Create New...