BootStrap 4 Select Control

How do I set a Select controls value from within a button event example I have 10 items numbered 1 - 10 and I want to Set the Control to show number 5 I tried Select1.text = “5” and Select1.value = “5” but when the control displays it shows only “1”

I modified the Select sample to have items from 1 to 10.

I was then able to do

Select1.item = "5"

Give it a try!

Nope I tried that earlier but thanks

and it didnt work

Did you try loading the sample and modifying that? I just tried it here and it worked properly, leading me to think the problem might be different than you think it is.

Yes i did and you are right but it just wont change what is displaying it shows that i have changed the item once i click on the control but it does display it.

Can you explain a bit better?

The select control defaults to 1 there is 100 possible selects 1 thru 100. When i programmatically set it to say 23 when i change the form where the select control is located it still shows 1 but when i click on the control it shows 23. What is happening is the select control which is bootstrap 4 is not refreshing and displaying the new value

How can I see the issue using the sample?

David, if the Select items are numbers, you can select any one you want by removing the quotes:

For example, having Select1 on Form2:
if you want to auto-select the fifth item, then on Form1, Button1, set it to Select1.item = (5 - 1) (accounting for the Index value), and when you get to Form2, the Select should be showing 5 as the pre-selected item.

This works for me.

Thank you i will give it a try.