How do I remove the focus from ddlist after making selection?

E

Ethan

Making a selection in a drop-down list runs a db query. My users are making
their selection, getting the query results then try to scroll with the wheel
which opens the ddlist again.

How do I remove the focus from the ddlist control after the query is run?

On behalf of my users and I, thank you in advance.
 
E

Ethan

SelectNodes works. The problem is I need to select the node as soon as the
query results are returned without any user action and if I combine Query()
with SelectNodes I get a run-time error saying that the SelectNodes call is
an invalid selection.

How do I get SelectNodes to run after the query results are returned using
the same trigger event such as OnAfterChange?

Thanks for the quick response.
Ethan
 
B

bratt

I had a similar error showing when I hid a dropdown based on what the
user selected and showed a text box in same location (similar to the
"Type text..." combo box in the InfoPath Conditional Format Dialog). I
had solved my SelectText problem by setting a flag and selecting a
third Node (not a drop down node) and for the OnContextChange method I
checked for the flag and redirected back to the desired node via
SelectText.
(This problem only seemed to occur with my code when in a repeated
section).
 
E

Ethan

Setting the Tab index of the ddlist control to -1 did the job.
Thanks to Ashish for this simple solution. See his post "Subject: RE:
Changing the focus on the view"
 
G

Greg Collins [InfoPath MVP]

The problem is because your drop-down list is the first selectable control in the view. If you had something else selectable before that (like a text box or check box or anything else) then you could use the wheel without any problem.

--
Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com


Making a selection in a drop-down list runs a db query. My users are making
their selection, getting the query results then try to scroll with the wheel
which opens the ddlist again.

How do I remove the focus from the ddlist control after the query is run?

On behalf of my users and I, thank you in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top