Jump to content

UniDBLookupComboBox


picyka

Recommended Posts

C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Touch\DBLookupComboBox - Custom Remote Query (CDS)

 

Running the example above by cell phone, I notice that I need to double-click in the field to be able to search, is there any configuration for not needing to click more than once?

Note: Clicking only once the keyboard does not show to type.

 

Build 1531.

 

Link to comment
Share on other sites

3 hours ago, picyka said:

Running the example above by cell phone, I notice that I need to double-click in the field to be able to search, is there any configuration for not needing to click more than once?

Note: Clicking only once the keyboard does not show to type.

Hello,

Can you try this approach?

function afterCreate(sender)
{
    sender.inputElement.on('tap', function(){sender.focus()});
}

 

  • Like 1
Link to comment
Share on other sites

  • 3 years later...

how can i add to this ,,tap function", checking if there is any text written in the combobox ?

asking becouse without it the dropdownlist is hiding after 0.1 sec   

Link to comment
Share on other sites

10 minutes ago, PS1 said:

how can i add to this ,,tap function", checking if there is any text written in the combobox ?

asking becouse without it the dropdownlist is hiding after 0.1 sec   

Hello, 

Can you please clarify? 

Link to comment
Share on other sites

I need to check if there is any text in the textEdit part of unimDBLookupComboBox

Need something like this:

function afterCreate(sender)
{
     sender.inputElement.on('tap', function(){

         if (sender.e.getText() == "")
             sender.focus();

    });

}

It is needed becouse if user will select item from list, he cant again drop/show the list of items. It disappears after 0.1 sec. User need to change text in order to show the item list.

It works probably like that becouse in previous solution we setting focus when dblookupcombobox is taped. 

 

Link to comment
Share on other sites

One more question. How to add checking (in above afterCreate js function) if there are items in the ComboBox?

Need it becouse if user will query the records, chose item and later clear text (by clear button), after he tap again on the combobox it will show the items for 0.1 sec becouse the list is loaded already.

Link to comment
Share on other sites

1 hour ago, PS1 said:

One more question. How to add checking (in above afterCreate js function) if there are items in the ComboBox?

Need it becouse if user will query the records, chose item and later clear text (by clear button), after he tap again on the combobox it will show the items for 0.1 sec becouse the list is loaded already.

What you're asking still concerns to the mobile component ?!

Link to comment
Share on other sites

ok i think i found better solution:

function afterCreate(sender)
{   

  sender.inputElement.on('tap', function(){
   if (((sender.store.activeRanges == null) 
      || (sender.store.activeRanges[0].records.length == 0))) 
      sender.focus();
   });
}

 

It enables keyboard(on first tap) only if there are no loaded records in unimDBLookupComboBox. 

It works but i dont rly know if this is a good approach ?

Link to comment
Share on other sites

1 hour ago, PS1 said:

One more question. How to add checking (in above afterCreate js function) if there are items in the ComboBox?

You can use this code inside a function
 

if (sender.getStore().count() > 0) {

}

 

  • Like 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...