Spinner Initial Item Set?

jpvniekerk

Active Member
Licensed User
Longtime User
I've been struggling with this for the best part of a day and have read stacks of posts on the forum... But I'm still stuck... So please Help!

I'm creating spinners from database tables, and have to "point" the spinner to the current item.

I know how to do it with the spinner.selectedindex command, but I'm not able to get the right index position from the database table.

Test Program is attached.

Advice will be GREATLY appreciated!!
 

Attachments

  • TestProg.zip
    12.2 KB · Views: 227

gregmartin64

Member
Licensed User
Longtime User
As an extra tip, you can just do this in one line, if you have your data loaded in a map or any list that exposes IndexOf

For example with my field called "type"

Spinner.SelectedIndex=Spinner.IndexOf(m.Get("type"))

Will do the same thing as looping through the dataset or list and saves a lot of code if you have a few spinners on your view.
 
Upvote 0
Top