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

Raising event without definig a function for it

hi there,

i want to raise an event, for example a DoubleClick-Event of a DataGrid, but
i do not want to call a function
which is event handler.

Right now i do it like this:
void this_KeyDown(object sender, KeyEventArgs ke)

{

if (ke.KeyCode == Keys.Space)

this_DoubleClick(sender, null);

} // this_KeyDown
But in my form window, which holds the DataGrid, i did not get any calls
depending on the DoubleClick,
so i can´t do anything on that moment.

Plz help!

René
Nov 15 '05 #1
2 1349
Hi,

If you want to trigger the DoubleClick event of a DataGrid from within a
derived class, you should call OnDoubleClick( new EventArgs() ); This
should fire all registered events.

HTH,
Greetings
"René Meinecke" <to**@abc.org> wrote in message
news:OR**************@TK2MSFTNGP11.phx.gbl...
hi there,

i want to raise an event, for example a DoubleClick-Event of a DataGrid, but i do not want to call a function
which is event handler.

Right now i do it like this:
void this_KeyDown(object sender, KeyEventArgs ke)

{

if (ke.KeyCode == Keys.Space)

this_DoubleClick(sender, null);

} // this_KeyDown
But in my form window, which holds the DataGrid, i did not get any calls
depending on the DoubleClick,
so i can´t do anything on that moment.

Plz help!

René

Nov 15 '05 #2
Hi,

thanks a lot, that was it!

but i can´t believe, that there is no hint in the help of Visual Studio or
on any of the webpages to it.
so if anyone from Microsoft reads this, update your fucking help and tell
the people something
that is working.

so again, thx a lot and peace
René

"BMermuys" <bm**************@hotmail.com> schrieb im Newsbeitrag
news:g2*********************@phobos.telenet-ops.be...
Hi,

If you want to trigger the DoubleClick event of a DataGrid from within a
derived class, you should call OnDoubleClick( new EventArgs() ); This
should fire all registered events.

HTH,
Greetings
"René Meinecke" <to**@abc.org> wrote in message
news:OR**************@TK2MSFTNGP11.phx.gbl...
hi there,

i want to raise an event, for example a DoubleClick-Event of a DataGrid,

but
i do not want to call a function
which is event handler.

Right now i do it like this:
void this_KeyDown(object sender, KeyEventArgs ke)

{

if (ke.KeyCode == Keys.Space)

this_DoubleClick(sender, null);

} // this_KeyDown
But in my form window, which holds the DataGrid, i did not get any calls
depending on the DoubleClick,
so i can´t do anything on that moment.

Plz help!

René


Nov 15 '05 #3

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

Similar topics

3
by: Calvin Spealman | last post by:
I was wondering if it was possible, now or with a patch, to do either of the following: 1) Cause another thread's most recent function, or a given function in a given thread, to yield its...
6
by: Dan | last post by:
I've created a pocketpc app which has a startup form containing a listview. The form creates an object which in turn creates a System.Threading.Timer. It keeps track of the Timer state using a...
4
by: rawCoder | last post by:
Hi all, How Can You Raise Events Asynchronously ? Now for the details ... I want to do inter modular communication using events in such a way that the contributing modules need not...
1
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
6
by: msnews.microsoft.com | last post by:
Hi All, I am creating a control with ASP "ListBox" control. Also I have added necessary code to handle the ListBox.SelectedItemChanged Event. But surprisingly the control is not comng to...
4
by: Alexander Mueller | last post by:
Hi all, in a CheckedListBox there are afaics two members that change the checked-flag for an item i.e. SetItemChecked and SetItemCheckState. In the online-help there is a remark that...
2
by: Gman | last post by:
Hi, I have created a usercontrol, a grid control essentially. Within it I have a class: clsGridRecord. I have coded the events such that when a user clicks on the grid, say, the events occur on...
22
by: Oriane | last post by:
Hi there, I have to write an algorithm in .NET/C# which perform some task but has to be stopped after an intreval of dT seconds. Something like: dT = 30sec; for (;;) { t0 = GetCurrentTime...
1
by: Ajak | last post by:
Hi all, I would like to write a class (Task) with a method to do some lengthy process based on several of the class properties. The method is running on different thread. During the execution...
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: 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
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
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...
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
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,...

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.