473,396 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Tabcontrol-Windows application VB.NET

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
Nov 22 '05 #1
2 5141
I'm not a VB developer, so I'm not sure how to make a better If statement
here:
Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e
As System.EventArgs) Handles TabControl1.SelectedIndexChanged

If (Not (Me.DataGrid1.Parent Is Nothing)) Then

Me.DataGrid1.Parent.Controls.Remove(Me.DataGrid1)

Me.TabControl1.SelectedTab.Controls.Add(Me.DataGri d1)

End If

End Sub

Anyway, it seems to work fine be handling the "OnSelectedChanged" event of
the TabControl where it removes the DataGrid from its current TabPage and
then adds it to the currently visible TabPage.

"skumar" <sk****@awiware.com> wrote in message
news:06****************************@phx.gbl...
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

Nov 22 '05 #2
Thanks.It worked.
-----Original Message-----
I'm not a VB developer, so I'm not sure how to make a better If statementhere:
Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal eAs System.EventArgs) Handles TabControl1.SelectedIndexChanged
If (Not (Me.DataGrid1.Parent Is Nothing)) Then

Me.DataGrid1.Parent.Controls.Remove(Me.DataGrid 1)

Me.TabControl1.SelectedTab.Controls.Add(Me.DataGr id1)

End If

End Sub

Anyway, it seems to work fine be handling the "OnSelectedChanged" event ofthe TabControl where it removes the DataGrid from its current TabPage andthen adds it to the currently visible TabPage.

"skumar" <sk****@awiware.com> wrote in message
news:06****************************@phx.gbl...
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

.

Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Don | last post by:
how do i bring tabpages, which are part of a tabcontrol, to the front on the tabcontrol programmatically. I would like to bring specific tabpages to the front depending on user actions with the user...
0
by: Paiam Salavati | last post by:
I have to change the BackColor of a TabControl. therefore I have overriden the onPaint-Method of TabControl like this: Rectangle rectangle = new Rectangle(0, 0, this.Width, this.Height);...
1
by: Paiam Salavati | last post by:
I want to change the the color of the tabs and the color of TabControl itself in a TabControl. Therefore I wrote the following code in my customized TabControl-class: this.DrawMode =...
5
by: Tamir Khason | last post by:
How be able to manage more deeply UI of TabControl and TabPage For example - I want to manage border color, change color of TabPage reef, eliminate spaces from both sides of the reef, so I bould...
3
by: cdj | last post by:
Hi all, I've got a tabControl, initially with one tabPage, along with two buttons, one to add another tabPage, and one to delete the current (selected) tabPage. On each tabPage, when it is...
2
by: Francois Vanderseypen | last post by:
Can someone tell me why you cannot drag something onto a tabcontrol with zero tabpages? I have a kind of 'docking' interface and relies heavily on GDI+, a screenshot is available here: ...
8
by: Aaron Ackerman | last post by:
If I am expanding (maximizing a form how do I maximize the tab control along with it?
8
by: Gregory A Greenman | last post by:
I have a minor, but somewhat frustrating, problem. In a program I'm working on, I've got a tabcontrol that contains several other controls, a few of which are comboboxes. In the IDE, one of the...
2
by: michael sorens | last post by:
After extensive searching of the docs, I find no mention of support for Ctrl-Tab and Ctrl-Shift-Tab to navigate among tabs in a TabControl. I am surprised that such a common/standard keyboard...
2
by: Claudia Fong | last post by:
Hi, I added a tabcontrol in a panel in my form. My tabcontrol have more than 3 pages.. each page contains textboxes, combobox, checkbox. I want to disable the items of each of the page of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.