Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6138493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:52:31+00:00 2026-05-23T17:52:31+00:00

I have a combobox and it’s editable. So the user can select an item,

  • 0

I have a combobox and it’s editable. So the user can select an item, but if the item doesn’t exist, he can type in what ever he wants. But my problem is , if i select an existing item, everything works, and the value is set :

  <ComboBox  Height="23"  SelectedIndex="0"  HorizontalAlignment="Left" Margin="104,73,0,0" Name="comboBox1" VerticalAlignment="Top" Width="159" IsEditable="True" SelectionChanged="comboBox1_SelectionChanged" />

 private void comboBox1_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ToetsAlgemeneGegevensViewModel vm = (ToetsAlgemeneGegevensViewModel)this.DataContext;
            if (comboBox1.SelectedValue != null && vm != null)
            {


                vm.Examination.Course = comboBox1.SelectedValue.ToString();
            }

But, if I type in something, how can i set this value? Someone who knows how to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T17:52:32+00:00Added an answer on May 23, 2026 at 5:52 pm

    A quick answer:

    I think you should better use ComboBox.Text property. Make a string property in your view model and bind it in the Text property: Text="{Binding MyStringProperty}".

    Do what you do in your comboBox1_SelectionChanged inside the setter of your string property. I think this will be enough.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a combobox where the user can select a particular year (populated by
I have a combobox bound to a collection, so the user can select one
I have a combobox that passes along values in text, but they can have
I have a Combobox where user can choose an icon. I'd like the dropdown
I have ComboBox . When I click on item from expanded list, ComboBox select
I have a ComboBox with a remote json store. It lets the user type
I have a ComboBox with Sex(male, female..):And I demand from user to select a
I have ComboBox item style as follows (simplified): <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width=* /> <ColumnDefinition
I have a combobox bound to a database table. When the user inserts a
I have: ComboBox.DataSource = System.Enum.GetValues(typeof(ImageLayout)); but how do I set the ComboBox.SelectedItem to an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.