-
Databinding problem
Hello everybody,
I have a databinding problem. I want to bind a combobox to my object or dataset.
I first fill my combobox with my initial values and then I databind it with my object. My problem is that I always see in my selectedvalue my first value of the initial values. Not the stored value in my database !
An example : I receive Jan, Greg, Peter
When Peter is stored in my database, I databind my combobox to the property. The property returns me Peter but when I look at the combobox, it shows me Jan.
Is this normal behaviour ? Do I look over something ? Or do I need to code my own selectedindex ?
Thanks,
Bjorn
-
What property of combubox you bind to? DispalyMember or ValueMember? I think you can not both bind and provide initial values for displaymember.
-
Thanks for your reply but I can't get it done.
I initialized everything and then I set my displaymember to the value but it stays at the first indexposition :(