|
-
Jan 9th, 2003, 02:26 AM
#1
Thread Starter
Registered User
In desperate need of help (old, se other thread with same name)
Last edited by Athley; Jan 9th, 2003 at 10:49 AM.
-
Jan 9th, 2003, 02:29 AM
#2
Thread Starter
Registered User
Thanks, it was sure worth checking the events....
I added a messagebox in the SelectedValueChange event and that messagebox came up 4 times before the form was painted, but when I set the selectedValue through code it didt fire at all...
LOL!!
What is happening here?
AND WHY ON EARTH IS MY REPLY COMING ON TOP OF YOUR REPLY?????????
-
Jan 9th, 2003, 02:53 AM
#3
Fanatic Member
AND WHY ON EARTH IS MY REPLY COMING ON TOP OF YOUR REPLY?????????
Is the time on your machine correct ? I though the forum database sorted the messages by descending order of posting id ...
Using VB.NET 2003/.NET 1.1/C# 2.0
http://del.icio.us/rajoo
Blow your mind, smoke gunpowder
Ashes to ashes, dust to dust
If God won't have you, the devil will. - Author unknown
Don't follow me, I'm lost too ...
-
Jan 9th, 2003, 03:05 AM
#4
Thread Starter
Registered User
well the clock is accurate with the time here in sweden and I have the correct time setting under the options of my account.
I can see that it has to do with the time though.....
-
Jan 9th, 2003, 05:20 AM
#5
Thread Starter
Registered User
In desperate need of help (old, se other thread with same name)
I'll try to make this short....
I have a databound form (bound to Table1) with a combobox that has another table (Table2) as its datasource, the SelecteValue property of that combobox is databound to Table1.
So basicly I choose something from the combobox that has values from Table2 and save the cjosen value to Table1.
If I do this manually (with the mouse) everything works great, but if i do it with code (ie Combobox1.SelectedValue = 2 for example) it does not work, it then takes the default value (0) when I call the EndCurrentEdit of the BindingManagerBase.
It also works if I set the SelectedIndex property of the combobox, but that is of course something I'd rather not do as I have to loop through all indexes of the box to find wich one has the correct Value.
Note:
I've heard sayings like "databinding of Hell" and Iv'e heard people saying that databinding is the devils work. Just to let you know...... THE DEVIL IS A MERE FART compared to databinding !!
I guess you can get a notion of my frustration...... 
Any help is GREATLY appreciated!!
Last edited by Athley; Jan 9th, 2003 at 10:48 AM.
-
Jan 9th, 2003, 07:05 AM
#6
Fanatic Member
Athley
I haven't used databound controls yet but I'm trying to guess why it is working with the mouse but not with code (well just to share your frustration). I think that contrary to the behaviour in VB6 where when you set the value of say a command button with that would fire the Click event of the button this does not happen in VB.NET.
So, may be it would be worth finding out what methods or events are fired when you click the bound combo selection and explicitly fire then after assigning the SelectedValue property.
Using VB.NET 2003/.NET 1.1/C# 2.0
http://del.icio.us/rajoo
Blow your mind, smoke gunpowder
Ashes to ashes, dust to dust
If God won't have you, the devil will. - Author unknown
Don't follow me, I'm lost too ...
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
|