473,396 Members | 1,847 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.

WinForm and Tab Question

Hi All, I have a Tab Control on a windows form. Each of the Tabs collection
have a Datagrid in it.
When I switch a tab, is there a way I can retrieve contents of the Datagrid
which the Tab has focus on?
Right now I am explicitly using dg1 and dg2 and when a certain Form menu is
clicked I explicitly point to the DataGrid. Was looking for a better
solution.
TIA
Nov 16 '05 #1
1 1579
Vai2000,

If you only have one data grid on each tab page, then I would get a
reference to the current tab page, and then cycle through the children until
the type of the Control is a datagrid. Then, you can use it appropriately.

Either that, or I would create a class that extends the TabPage class
which has a property that will return the DataGrid control that is contained
in the TabPage itself, and then call this property on the active tab page.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Vai2000" <no****@microsoft.com> wrote in message
news:OV****************@tk2msftngp13.phx.gbl...
Hi All, I have a Tab Control on a windows form. Each of the Tabs collection have a Datagrid in it.
When I switch a tab, is there a way I can retrieve contents of the Datagrid which the Tab has focus on?
Right now I am explicitly using dg1 and dg2 and when a certain Form menu is clicked I explicitly point to the DataGrid. Was looking for a better
solution.
TIA

Nov 16 '05 #2

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

Similar topics

3
by: The Real Andy | last post by:
OK, please excuse the simple (ambiguous) nature of this question. I have a winform, set up as a base class. I inherit about 5 instances from this form, each relating to a db table. Currently I am...
9
by: Djavdet | last post by:
Hi everyone, I need to work with web sites from my program but i don't need to show web site content.. I only need to get web page change something in html document and either move on or send...
0
by: DBC User | last post by:
Hi Sharpies, Simple question, I have 2 questions; 1. Help files for WinForm application, which direction Microsoft is going? I heard they are moving to XML based help files. Is there a write...
0
by: needin4mation | last post by:
static void Main() { using (WinForm our_directx_form = new WinForm()) { Application.Run(our_directx_form);
3
by: VB Programmer | last post by:
How can I launch a local winform application from a web page? (FYI: My goal is to have this winform be a "no touch deployment" application.) Thanks.
6
by: IntraRELY | last post by:
I have an WinForm (VB.NET) that is launched from an ASP.NET page that uses Form Authentication. After the WinForm is lauched it calls a web service. I want to use the credentials stored in the...
5
by: Matthew Hood | last post by:
Here's a interesting question for the guru's out there. I've created a VB.NET class library with a couple of forms that I have successfully got to work from within MS Access using COM interop and...
2
by: jyanmin.fang | last post by:
Hi, In my current project, I need to embed an .NET winform usercontrol in the aspx page (via <Objecttag). This winform usercontrol has an event called DoEvent (void DoEvent()). This winform...
14
by: Monty | last post by:
Hello, I have created a solution which has both a web UI and a winform UI, the latter is just for administrators. The Web UI (a Web Application Project) and the winform project both...
4
by: Hitchkas | last post by:
I have a very beginner and fundamental question regarding porting and running C# programs in Linux. As a background I am a total idiot when it comes to Linux but somehow managed to install Ubuntu...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.