StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
WinForms (How do I?)
»
Setting the combobox selection based on value instead of index
Setting the combobox selection based on value instead of index
Post Reply
Like
0
Setting the combobox selection based on value instead of index
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Andria Jensen
Andria Jensen
posted 19 Years Ago
ANSWER
Topic Details
Share Topic
Group: Forum Members
Posts: 336,
Visits: 497
I'm using the Inherited UI ComboBoxEdit and I want to save the selection of this and a bunch of other combos on a form and then be able to restore them when I come back to that same form. The ValueMember and DisplayValue properties may not be the same and for other reasons I need to save out the SelectedValue instead of the SelectedIndex. I can save it out just fine using the SelectedValue property. Is there a way to just set a property on the combo box and have it select the corresponding item in the list when I go to restore my selections? I tried setting SelectedValue to the value which was saved out, but this does not work. I was going to just right a little method to search through the Items collection and set SelectedIndex based on which item matches the saved SelectedValue. I just wanted to make sure there wasn't an easier way before I implement unnecessary code. Thanks
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
Setting the combobox selection based on value instead of index
Andria Jensen
-
19 Years Ago
You should be able to set the SelectedValue property directly,...
StrataFrame Team
-
19 Years Ago
Awesome, thanks! Yes, the one I was having problems with specifically...
Andria Jensen
-
19 Years Ago
Post Reply
Like
0
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search