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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:35:50+00:00 2026-05-11T19:35:50+00:00

I am successfully databinding and using WPF Comboboxes and have had some success with

  • 0

I am successfully databinding and using WPF Comboboxes and have had some success with cascading some of the Comboboxes by triggering the update on the child combo when the parent combos SelectionChanged event is triggered. My combos are cboCountry, cboCity and cboTown.

However, this isn’t reliable as it seems to blank the selected value in the child combo when the parent triggers an update in the child combos dropdown contents.

Has anyone experienced this behaviour (and has resolved it) or does anyone have any code that is successfully working without this issue?

Private Sub cboArea_SelectionChanged(ByVal sender As Object, ByVal e As System.Windows.Controls.SelectionChangedEventArgs) Handles cboArea.SelectionChanged
    Dim drv As DataRowView = CType(CType(e.Source, ComboBox).SelectedItem, DataRowView)
    If Not IsNothing(drv) Then
        Dim Area As String = drv(0).ToString
        Dim dv As New DataView(gLookupTown, "ItemGrouping = '" & Area & "'", "ItemValue", DataViewRowState.CurrentRows)
        cboTown.ItemsSource = dv
    End If
End Sub
  • 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-11T19:35:50+00:00Added an answer on May 11, 2026 at 7:35 pm

    This is because you’re changing the ItemsSource of the ComboBox. Without a code sample I can’t tell you how to fix it. The best option is to filter an ObservableCollection based on the parent ComboBox’s value so that you don’t need to change the child ItemsSource. You can also try resetting the SelectedValue when the ItemsSource changes.

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

Sidebar

Related Questions

In a C# WPF program I have a grid that I have successfully populated
I have successfully connected to an Oracle database (10g) from C# (Visual Studio 2008)
I successfully created a custom rich notification for Android >= 3.0 that shows some
I successfully created my first Entity Framework Code first project using SQL Server CE.
I successfully built Git on Windows using the source github.com/msysgit/git . When I go
I successfully deleted all records from a table in a database. I have a
I successfully installed and set it up searchlogic for basic (keyword) searching. I have
I successfully created my war file using warble. I am trying to deploy my
I'm creating a Silverlight App. I have successfully created the data, bound it to
I am attempting to write my first implementation of databinding in a WPF form.

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.