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 605623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:09:57+00:00 2026-05-13T17:09:57+00:00

<ComboBox Height=23 Margin=52,64,33,0 Name=comboBox1 IsSynchronizedWithCurrentItem=True IsEditable=True DisplayMemberPath=Value SelectedItem={Binding Path=Number, Mode=TwoWay} /> public class Number

  • 0
<ComboBox Height="23" Margin="52,64,33,0" Name="comboBox1"  
              IsSynchronizedWithCurrentItem="True"
              IsEditable="True"
              DisplayMemberPath="Value" 
              SelectedItem="{Binding Path=Number, Mode=TwoWay}"
              />

public class Number : INotifyPropertyChanged
    {
        private string value;
        public string Value
        {
            get
            {
                return value;
            }
        set
        {
            this.value = value;
            this.PropertyChanged(this, new PropertyChangedEventArgs("Value"));
        }
    }

    #region INotifyPropertyChanged Members

    public event PropertyChangedEventHandler PropertyChanged = delegate { };

    #endregion
}

 comboBox1.ItemsSource = new Number[] { new Number() { Value = "One" },
                                                   new Number() { Value = "Two" },
                                                   new Number() { Value = "Three" }};

My binded data set is not modifying when i am editing combobox text.
ie., target to source binding is not happening.

  • 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-13T17:09:57+00:00Added an answer on May 13, 2026 at 5:09 pm

    adding to what Josh advises….
    first, you should think about using a diff variable name then “value”,
    second, you shouldnt fire the “PropertyChanged” event if the value is not changing.

    add this to the property setter….

    if ( value != this.value )
    {
    
    }
    

    third, your not binding to an instance of your data, your binding to your class type

    SelectedItem="{Binding Path=Number, Mode=TwoWay}"
    

    fourth, you should set the ItemSource in your combobox to an ObservableCollection< Number >

    lastly, you should check out Bea’s great blog entry about debugging databinding. She has many great examples.

    ok, so now that i have access to my compiler…. here is what you need to do.
    Firstly, WHERE is the “Number” property located that you are binding to? you can not bind back to the list that is the source of your combobox.

    you need to add an ElementName to the binding, or set the DataContext to the object that contains the Number property. Second, that Number property, wherever it might be, needs to be either a Notify or a DependencyProperty.
    for example, your Window class would look like this…..

       public partial class Window1 : Window
       {
          public Number Number
          {
             get { return (Number)GetValue(ValueProperty); }
             set { SetValue(ValueProperty, value); }
          }
    
          public static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(Number),typeof(Window1), new UIPropertyMetadata(null));
    
       }
    

    and your window.xaml would look like this…

    <Window x:Class="testapp.Window1"
              x:Name="stuff"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Window1" Height="300" Width="300">
        <Grid>
            <ComboBox Height="23" Margin="52,64,33,0" Name="comboBox1"  
                  IsEditable="True"
                  DisplayMemberPath="Value" 
                  SelectedItem="{Binding ElementName=stuff, Path=Number, Mode=TwoWay}"
            />
        </Grid>
    </Window>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Flex ComboBox that gets populated by a dataprovider all is well...
I have a Tix.ComboBox with an editable text field. How do I force the
I want my WPF ComboBox's ItemsSource property to be bound to MyListObject's MyList property.
Are there any professional Combobox controls (dropdown list with autosuggestion) based on the jQuery
I filled up a combobox with the values from an Enum. Now a combobox
When a ComboBox is clicked this causes it to be selected in the window.
I have a ComboBox that I set up like this: this.cmbCustomerJob.DisplayMember = display; this.cmbCustomerJob.AutoCompleteMode
I have a ComboBox hosted in a ListView and I need changes in the
I have a ComboBox inside of a cell of a DataGridView Row on a
i've got a ComboBox that i generate dynamically and fill with some items. i

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.