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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:24:48+00:00 2026-05-21T03:24:48+00:00

I have a combobox, which is filled with enums via data binding and this

  • 0

I have a combobox, which is filled with enums via data binding and this works quite well. Also the binding of the selected item to a property works fine.

I have set the binding to the property to TwoWay, but if the property MyDbType changes, the combobox changes not.

XAML:

<Window.Resources>
    <ObjectDataProvider x:Key="dbEnum" MethodName="GetValues" ObjectType="{x:Type sys:Enum}">
        <ObjectDataProvider.MethodParameters>
            <x:Type TypeName="utils:DbType" />
        </ObjectDataProvider.MethodParameters>
    </ObjectDataProvider>
</Window.Resources>

<ComboBox Margin="0" Name="comboDbType" VerticalAlignment="Center" Grid.Row="1" Height="25" 
  ItemsSource="{Binding Source={StaticResource dbEnum}}" 
  SelectedItem="{Binding Path=CurrDbSettings.MyDbType, 
    RelativeSource={RelativeSource Mode=FindAncestor, 
      AncestorType={x:Type local:MainWindow}}, 
    Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
  Grid.ColumnSpan="1" Grid.Column="1">
</ComboBox>

Any hints?

  • 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-21T03:24:48+00:00Added an answer on May 21, 2026 at 3:24 am

    The property MyDbType needs to somehow tell the binding system that it has changed. For that, there is the INotifyPropertyChanged interface which you need to implement on the CurrDbSettings object’s class and rise the PropertyChanged event in the setter of the MyDbType property. Something like this:

    public class DbSettings : INotifyPropertyChanged
    {
       ...
       public MyTypeEnum MyDbType
       {
           get { return _myDbType; }
           set 
           { 
               _myDbType = value;
               RaisePropertyChanged("MyDbType");
           }
       }
       ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ComboBox in WPF which is databound, and has data template which
I have a JSON data store used for a combobox selection which is working
The problem is strange, I have a combobox which is correctly filled with items
I have a combobox which has ItemsSource set to an ObservableCollection property called DATA
I have a ComboBox which I cannot bind directly to (due to this bug
I have a combobox which binds data from the database. It gets the data
Say I have a DataGridView in which I dynamically build up a ComboBox column
I have a combo box on a WinForms app in which an item may
I have a ComboBox that I set up like this: this.cmbCustomerJob.DisplayMember = display; this.cmbCustomerJob.AutoCompleteMode
I have an ExtJS combobox with a remote data store behind it. In all

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.