Tab Control

S

skumar

I need to add a datagrid in the Tabcontrol which can be
used in common by all Tabpages.

Right now i have to add datagrid to individual tabpages.

Can anyone help me in this. i just want to add one
datagrid control to tabcontrol which can be used and seen
in all tabpages.

Thanks,
SKumar
 
K

Kalpesh Shah

I didnt get the idea behind same datagrid in all pages ?
Could you give the context behind it ?

Kalpesh
 
T

Tim Wilson [MVP]

Why not just place the DataGrid on the parent to the TabControl and then
make sure the z order is properly set so that the DataGrid is in front of
the TabControl. If you really need this as part of your application then
this should be a simple enough solution. So Form1 is the base Form (the base
parent to all other controls). Then place TabControl1 and DataGrid1 as
controls on Form1. Then right-click the DataGrid in the designer and select
"Bring to Front". Now you can position the DataGrid over the TabControl and
give the illusion that as you change TabPage's that the DataGrid is common
to all. And if you need to reposition/resize the DataGrid when the
position/size of the TabControl changes then just handle the LocationChanged
and Resize events for the TabControl.
 
H

Herfried K. Wagner [MVP]

* "skumar said:
I need to add a datagrid in the Tabcontrol which can be
used in common by all Tabpages.

Right now i have to add datagrid to individual tabpages.

Can anyone help me in this. i just want to add one
datagrid control to tabcontrol which can be used and seen
in all tabpages.

Place the datagrid _outside_ the tabpages and set its z-order to show in
front of the pages...
 

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