473,398 Members | 2,120 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,398 software developers and data experts.

Public Event Undefined Value

Hi, I have a simple user control with a public event that's raised by a
datagrid selectindexchanged event.

public event EventHandler UserAccountChosen;

private void dgUserSearch_SelectedIndexChanged(object sender,
System.EventArgs e)
{
if(UserAccountChosen != null) // here!!
{
this.UserAccountChosen(this, e);
}
}

but at runtime in debug where I wrote // here!! when I hover over
UserAccountChosen is says

UserAccountChosen = <undefined value>

and I dont understand why. Anyknow know what does that? What am i
missing

Nov 19 '05 #1
2 1153
Hi Antonio.
What are you really going to do? Create an event?
try something like this:
void Page_OnLoad(...)
{
DataGrid.OnSelectedIndexChanged += new EventHandler(myEvent);
}

void myEvent((object sender, EventArgs e)
{
// your code goes here
}
--
C# Dev
"Antonio" wrote:
Hi, I have a simple user control with a public event that's raised by a
datagrid selectindexchanged event.

public event EventHandler UserAccountChosen;

private void dgUserSearch_SelectedIndexChanged(object sender,
System.EventArgs e)
{
if(UserAccountChosen != null) // here!!
{
this.UserAccountChosen(this, e);
}
}

but at runtime in debug where I wrote // here!! when I hover over
UserAccountChosen is says

UserAccountChosen = <undefined value>

and I dont understand why. Anyknow know what does that? What am i
missing

Nov 19 '05 #2
thank you!

Nov 19 '05 #3

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

Similar topics

6
by: waste | last post by:
hello. is it possible to clear onClick event? eg: <div ... onClick="someFunction()"> when I want to run someFunction() only once. -- waste
2
by: Mike | last post by:
I have a textbox where I'm trying to restrict which keys a user can hit. My syntax is onKeyDown="myFunction(event)" To restrict the keys, Netscape requires the event.preventDefault method. ...
5
by: Jason | last post by:
Hello, I am trying to dynamically create a table, then set its <td>'s onclick: var table = document.createElement("table"); var row = table.insertRow(-1); var td = row.insertCell(-1);...
2
by: Ralph | last post by:
Hi I don't understand why it's not working: function schedule(imTop){ this.tdImagesTop = imTop; } schedule.prototype.selectEl = function() { alert(this.tdImagesTop);
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: 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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.