Click here to Skip to main content
15,919,434 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hello
In my silver light combobox control how i will set value.

for set datamember i am writing:-

comboBox1.DisplayMemberPath = "emp_name";

But How I will set value.



Thanks..............
Posted
Comments
Sergey Alexandrovich Kryukov 9-Feb-12 1:09am    
Broken MSDN? Too bad, I understand... :-)
--SA

Use the read/write properties SelectedIndex (preferred), SelectedItem, SelectedValue, you can also operate with the read-only property Items directly; see:
http://msdn.microsoft.com/en-us/library/system.windows.controls.combobox%28v=vs.95%29.aspx[^].

—SA
 
Share this answer
 
Comments
Espen Harlinn 9-Feb-12 8:47am    
5'ed!
Sergey Alexandrovich Kryukov 9-Feb-12 12:04pm    
Thank you, Espen.
--SA
Hi,
You can use content property for define value in silverlight control
Example like <comboboxitem content="R15">
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900