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

  • Home
  • SEARCH
  • 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 7914231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:02:49+00:00 2026-06-03T14:02:49+00:00

I have a ComboBox that it looks like this: <ComboBox ItemsSource={Binding JobList} SelectedValue={Binding Job,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}

  • 0

I have a ComboBox that it looks like this:

<ComboBox
    ItemsSource="{Binding JobList}"
    SelectedValue="{Binding Job,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}"
    DisplayMemberPath="Title"
    SelectedValuePath="Id"
    IsEditable="True"
    StaysOpenOnEdit="True"
    />

and its binding to my ViewModel that looks like this one:

public class ViewModel {
    // this will fill from a database record for a person
    public Job Job {
        get { return _job; }
        set {
            if(value == _job) return;
            _job = value;
            OnPropertyChanged( () => Job );
        }
    }
    // this will fill from all jobs records in database
    public ObservableCollection<Job> JobList 
    { /* do same as Job to implementing INotifyPropertyChanged */ }
}

and the Job is:

public class Job {
    public int Id { get; set; }
    public string Title { get; set; }
}

Really, I want to fill the ComboBox with job’s list. So if the user’s specified Job was in list, user can select it from list, otherwise, he enter a new Job.Title in ComboBox, the view model notify on it, and create a new Job item and also add it to JobList.

Have you any idea? can you help me please?

  • 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-06-03T14:02:51+00:00Added an answer on June 3, 2026 at 2:02 pm
    1. Create a string property in the viewModel something like ‘SelectedJobName’
    2. Bind this property to Combobox.Text
    3. Wherever you want to use the entered value (Command, Presenter), check if selected value is not null and selectedJobName property value is not/matching.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a data grid that looks like this <tk:DataGrid ItemsSource={Binding Parents} AutoGenerateColumns=False> <tk:DataGrid.Columns>
I have a style that looks like this: var comboBoxItemStyle = new Style(typeof(ComboBoxItem)); comboBoxItemStyle.Setters.Add(new
I have a ListBox with a DataTemplate that looks like this: <ListBox Name=listBox> <ListBox.ItemTemplate>
I have a ListView that looks like this: The combo box is bound to
Okay I have something that looks like this: Company Name-1234 I only want the
I have a HashMap that looks like this: HashMap<CauseCategory, ArrayList<Cause>> data; CauseCategory and Cause
I have a ComboBox that doesn't seem to update the SelectedItem/SelectedValue. The ComboBox ItemsSource
I have a combobox that is binding to an ObservableCollection of strings in an
I have a ComboBox that has the SelectedItem bound to the ViewModel. <ComboBox SelectedItem={Binding
I have a table in SQL Server which looks like this: ID Code Name

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.