Haunted Visual Studio

H

Hemang Shah

Can someone please explain the following behaviour, its driving me nuts!

I have a a listbox and a tab control which has many text boxes on it.

I have a dataset and few dataview.

If I bind the textboxes and listbox to dataset, it displays just fine.
However if I bind anything to the dataview, it shows up blank.

My first guess was that there is something wrong with the dataview, so I
drag another textbox to the form, and point the text to dataview and it
displays just fine!

If I drag that on the tab control, it again goes blank, now even if I drag
it outside the tabcontrol its blank unless I bind it to the dataset.

But if I create a new texbox on the tabcontrol and bind it to dataview it
displays just fine.

I had copied & pasted few controls from another form. I checked the code
generated by windows and the old control and the new one I drag are
initialized the same.

Can this be a bug ? Migrating to Visual Studio has been a very bumby ride
for me!

Any suggestions would be appreciated.

Thank You
 
J

Joergen Bech

If you copied/pasted controls, the ...Handles ... stuff might have
been lost:

1. New project

2. Add Button1 to form

3. Double-click Button1:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click

End Sub

4. Back to forms designer:
4.1 Select Button1
4.2 CTRL-X (cut)
4.3 CTRL-V (paste)

5. Back to code module:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs)

End Sub

Notice that the " Handles Button1.Click" eventhandler went AWOL
during this process.

VS.Net 2005 (Whidbey) does not seem to suffer from this problem:
It is able to recognize the original event handler and add the
"Handles ..." automatically.

Could this be related to your problem? Question is if anything
is lost (events? property values) when dragging the control between
the form and the tab control (which essentially is the same as
removing it from one container and adding it to another, though one
would expect VS.Net 2003 to be intelligent enough to keep track
of these things).

???

/JB
 
H

Hemang Shah

It is not the events on the control,

these are normal text controls, the funny part is that, if I bind them to a
dataset it works, but if I bind them to a dataview, it won't work, however a
new texbox bound to the dataview works just fine!

If there is an explanation for this, I would really like to know..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top