|
-
Nov 23rd, 2003, 10:01 PM
#1
Thread Starter
Lively Member
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
-
Nov 23rd, 2003, 10:41 PM
#2
Frenzied Member
What property of combubox you bind to? DispalyMember or ValueMember? I think you can not both bind and provide initial values for displaymember.
Last edited by Lunatic3; Nov 24th, 2003 at 04:32 AM.
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
-
Nov 24th, 2003, 04:31 AM
#3
Thread Starter
Lively Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|