0

Hi,

I have a form with tab control in it and in on of the tabs I got a datagrid.

On runtime, whenever I try to display data on the datagrid from a database, the datagrid "jumps" from the tab to the form itself so the tab hides most of it.

What am I doing wrong?

Thanks,
Udi

2
Contributors
7
Replies
11
Views
7 Years
Discussion Span
Last Post by Mitja Bonca
0

I dont understand. Can you do some pictures, that I can see what do you menan?

Hi,

you can see in the picture that the datagrid is in background, and not inside the tab control...

0

You didnt put the dataGrid on the tab control, but on the main form.

I did put it on the tab control, look:

0

Give me all the project, otherwise I cannot help you out. Upload it somewhere and give me the link (you can even pm me).
Mitja

0

Hi,

I've found out what I was doing wrong. I wrote in the code:

this.controls.add(datagridview1)

When I should have written:

tabpage2.controls.add(datagridview1)

That's why it appeared on form1 and not on the tabpage.

Thanks for your help!

0

You didnt put the dataGrid on the tab control, but on the main form.

Didn`t I tell you the same as you have find out now by your self?
Plase, be a bit more careful next time.
And mark the thread answered.

bye,
Mitja

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.