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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:42:34+00:00 2026-05-25T20:42:34+00:00

In the below window, the Existing Reports combo is bound to an observeablecollection of

  • 0

In the below window, the Existing Reports combo is bound to an observeablecollection of reportObjects. I have a reportObject property currentReport bound to the combo’s SelectedValue property, OneWay. However, that’s not working when bound in XAML.

SelectedValue="{Binding currentReport, Mode=OneWay}"

TwoWay binds fine, but I can’t do it that way without writing an undo() method to the reportObject class. I’m binding the currentReport’s properties to the various textboxes for editing. I want to bind OneWay so the source doesn’t get changed. The currentReport’s properties are all TwoWay bound to the corresponding textboxes so when I update the table in SQL [Save], it’ll pull from that object, who’s data is current.

<TextBox Text="{Binding currentReport.reportName, Mode=TwoWay}"

All of the properties bound from currentReport to the textboxes work fine as well. The only problem is the OneWay binding from the SelectedValue to the currentReport object. Does anyone have any ideas how to get this to work? I saw there was a bug, but the post I saw was 2009.

enter image description here

Sorry about the yellow. Not my idea. =)

EDIT: Added this XAML just in case.

<ComboBox ItemsSource="{Binding reportsCollection}" SelectionChanged="cboReports_SelectionChanged"
                                  DisplayMemberPath="displayName"
                                  SelectedValue="{Binding currentReport, Mode=TwoWay}"
                                  x:Name="cboReports" Width="342" Height="40" VerticalAlignment="Center"/>  
  • 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-25T20:42:35+00:00Added an answer on May 25, 2026 at 8:42 pm

    Forget about you need to change values – that is a separate problem – need to review your data design. Start with the UI problem question. If you want a user to be able to select an item from a combo box then it must have two way binding. Your first question is SelectedValue="{Binding currentReport, Mode=OneWay}" is failing why?

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

Sidebar

Related Questions

I have a list (see below) contained in a window. The window's DataContext has
I have below XAML code : <Window x:Class=WpfApplication1.Window1 xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml DataContext={Binding RelativeSource={RelativeSource Self}} WindowStartupLocation=CenterScreen
I have Javascript as below: <script type="text/javascript" language="javascript"> function redirectToPrevious(abcURL) { window.location.replace(abcURL); } function
When I use jQuery event listener to handle message event, like below: $(window).on('message', function(e)
Below is some sample code. The window does not resize (python3.2, on a Mac,
I am using the below code to close the window, by searching the window
i use the code below to open a new window when a user drops
I am having issues with the below HTML when resizing the window; 1: Right
Please tell me why my window doesn't render. Below is the javascript that i
We have an existing java-based heavyweight project that needed an interactive script interpreter. After

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.