This is a migrated thread and some comments may be shown as answers.

SelectedItem Binding OneWayToSource tries to get the property value

1 Answer 100 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Calin Calin
Top achievements
Rank 1
Calin Calin asked on 26 Jul 2010, 08:31 AM
Hi,

I have a combobox in my application that has this binding on the SelectedItem

SelectedItem="{Binding Path=Food, Mode=OneWayToSource}">

The back end property is define as follows

public Food Food
{
  get { return _food; }
  set { _food = value; }
}

My problem is that the above binding will try to get the property, this is not the expected behavior for this type of binding.
Can you suggest a work around you come up with fix ?

Thank you,

1 Answer, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 26 Jul 2010, 03:03 PM
Hello Calin,

As far as I can see, the same happens with the standard WPF ComboBox control, so I guess this is the expected behavior of the binding.

Greetings,
Valeri Hristov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ComboBox
Asked by
Calin Calin
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Share this question
or