WPF Reflections

Feb 5 2008   3:38PM GMT

ListView – rows with combo boxes



Posted by: MarkWPF
Tags:
WPF

Are you having a problem with a ListView with ComboBoxes?

Do you have the scenario where you have a ListView with a GridView, and you have an editing template for one (or more) columns?
Say your object looks like:

public class Order
{

public string Id
{
get ;
set ;
}

public CounterParty
{
get;
set;
}

}

where counterparty is a reference to a list of counterparties.
you might have a celltemplate with a combobox with it’s ItemsSource set to the counterparties list.

Are you scratching your head because every time you add a new Order (in this case), but every time you change a combo box it changes every row to be the same item in the combobox?

Try saying IsSynchronizedWithCurrentItem=”False” rather than leaving it out altogether.

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: