473,946 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TabPage Control OnClick Event

I am trying to run code that binds a DataGridView control on a TabPage. I
inserted the code in the TabPage_Click event, but when the tab is clicked,
the event never fires.

I understand it is necessary to set the StandardClick style to enabled. I
can't seem to find a StandardClick style on the TabControl, but I used the
following code in the Form_Load event.

this.SetStyle(C ontrolStyles.St andardClick, true);
this.UpdateStyl es();

Still no click event...

Am I doing something wrong?

--
Regards,

Fred Chateau
http://hotelmotelnow.com
Jun 1 '07 #1
1 7631
The parent TabControl has a few events that you can handle:

Selecting()
SelectedIndexCh anged()
Selected()
"Fred Chateau" <we*******@hote lmotelnow.comwr ote in message
news:eS******** ******@TK2MSFTN GP02.phx.gbl...
>I am trying to run code that binds a DataGridView control on a TabPage. I
inserted the code in the TabPage_Click event, but when the tab is clicked,
the event never fires.

I understand it is necessary to set the StandardClick style to enabled. I
can't seem to find a StandardClick style on the TabControl, but I used the
following code in the Form_Load event.

this.SetStyle(C ontrolStyles.St andardClick, true);
this.UpdateStyl es();

Still no click event...

Am I doing something wrong?

--
Regards,

Fred Chateau
http://hotelmotelnow.com


Jun 1 '07 #2

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

Similar topics

3
8470
by: John Livermore | last post by:
From javascript in IE, I have a need to hijack the onclick event for an element and replace it dynamically with my own. I have tried the following... control.onclick = 'myHandler();'; but this doesn't seem to do the trick. How do I go about doing this? Thanks,
1
9688
by: Chris Soulsby | last post by:
Hi, I have a control that contains a embedded ie control. I used the following code to add a onclick event to a table element: IHTMLDocument2 oIHTMLDocument2 = (IHTMLDocument2)m_oWebBrowserControl.Document; mshtml.HTMLTableClass oHTMLElement = (mshtml.HTMLTableClass)oIHTMLDocument2.all.item(strObjectName, null); ((mshtml.HTMLTableEvents2_Event)oHTMLElement).onclick += oEventHandler;
3
7751
by: Arulraja | last post by:
Hello, I have created 2 custom server controls, The parent custom control contains multiple child custom controls. The Child control has a button on it. If I Click the button control, it calls the Parent controls CreateChildControls() method before calling the child control's button click event. Because of this behaviour, I am not getting the changes I made in the
5
2604
by: moondaddy | last post by:
I have a <a> element in a datagrid which wraps some asp.net labels. this element also has an onclick event which does not fire in netscape 6 (and perhaps other browsers for all I know...). Below is the code for this. the onclick event calls a javascript function which I put an alert in the firt line to tell me if its working. It does work in IE. Any ideas on how to get netcrap... oops, I'm sorry, netscape to fire the onclick event? ...
1
1978
by: Kwena Seema via .NET 247 | last post by:
Hi, I'm doing a web app,what i want to achieve is: when i click a specific day on a calender control, it takes me to a specified aspx page. -------------------------------- From: Kwena Seema ----------------------- Posted by a user from .NET 247 (http://www.dotnet247.com/) <Id>1s8tbum0O0WURnQvQ6ZJZA==</Id>
2
2245
by: DataSmash | last post by:
Hello, I've created a simple form with 2 radio boxes, 2 text boxes and a button. When I click the button, I'd like to write each "choice" to a text file. I can't figure out how to "link" the onClick event to the other 4 controls. Any help would be much appreciated! R.D. Harles
5
13972
by: Stuart Shay | last post by:
Hello All I am working on ASP.NET 1.1 Custom Pager that allows a User to Enter a Number in a TextBox and go to the page selected. Since the OnClick Event does not work in ASP.NET 1.1 for a TextBox I want to use a hidden button to fire when the Onclick Event is fired for the TextBox.
0
1531
by: Mel | last post by:
I populate my tree programmatically; it's just a list of directories and their files. I need to capture the click event every time a node is clicked because I perform one action for a .PDF file type and another action for a .DOC file type. SelectedNodeChanged event is triggered only when you select different node, but if you click on the same node (that is ALREADY SELECTED) no event is triggered. How do I capture the click event? ...
21
13515
by: brucedodds | last post by:
I have an Access 2003 form bound to a SQL Server table via ODBC. Often clicking a button on the form has the effect of requerying the form rather than firing the OnClick event. Does anyone have an explanation? Is this evidence of corruption, or a known side effect? TIA Bruce
0
10150
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9975
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11141
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11324
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10679
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9873
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7403
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6097
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4928
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.