Jump to content

Recommended Posts

Posted

i have 2 issues:

FIRST:

i do assign a combobox (for user searching) after retrieving from the DB like this:
 

var
  LList: TStringList;
...
cbUser.Items.Assign(LList);
>> now i want to expand the combobox when Items.Count > 0

the combobox is filled correctly when i open it manuially, no chance to open it per code.

tried a lot experimenting with JS but it doesn't react e.g. on

cbUser.JSInterface.JSCode(
  'if (this.rendered && this.getStore().getCount() > 0) {' +
  '  this.expand();' +
  '}'
);

How should i configure the combobox and how to perform the auto expand?

SECOND:

when i select an item (combobox opened manually) the the OnSelect is fireing but the ItemIndex is always -1, doesn't matter which item is choosed

WHY? and how to get the right itemindex?

Posted

Hi,

i'm using  uniGUI 1.95.0.1610 & Ext JS 7.9.0

i tried to make the demo very near to the real app, regarding this functionality.

Please check the comments in source.

Interesting and not explainable why in the demo the reading of the ItemIndex is working but in my app not...maybe you can figure it out as the only difference in the demo is that StringList is filled manually and in my app it comes from the DB

thank you!

Test_ComboBox.rar

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