473,387 Members | 1,517 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,387 software developers and data experts.

can you pass sender

hey all,
i have a dropdownlist inside my gridview and i'm specifying the datasource
of the dropdownlist as LoadDropDownList. I was wondering if i can pass it
Sender,Source or something like that? (i.e. LoadDropDownList(sender)?

thanks,
rodchar
Nov 6 '06 #1
3 1273
Yes, you can pass the sender and EventArgs. In fact, this is done routinely
to bubble up information (like from a control to a page).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:B8**********************************@microsof t.com...
hey all,
i have a dropdownlist inside my gridview and i'm specifying the datasource
of the dropdownlist as LoadDropDownList. I was wondering if i can pass it
Sender,Source or something like that? (i.e. LoadDropDownList(sender)?

thanks,
rodchar

Nov 6 '06 #2
So if i go to quick tasks for the DropDownList that's inside my GridView
EditTemplate and goto EditDataBindings what do I specify to pass the
DropDownList itself as an argument?

"Cowboy (Gregory A. Beamer)" wrote:
Yes, you can pass the sender and EventArgs. In fact, this is done routinely
to bubble up information (like from a control to a page).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:B8**********************************@microsof t.com...
hey all,
i have a dropdownlist inside my gridview and i'm specifying the datasource
of the dropdownlist as LoadDropDownList. I was wondering if i can pass it
Sender,Source or something like that? (i.e. LoadDropDownList(sender)?

thanks,
rodchar


Nov 6 '06 #3
That's not how it works.

MS is choosing the "object sender" in that case.

When you wire up your own events, handlers, and subclassed EventArg .......
you can then specify a sender.

You have to figure out what you need to do with the subclassed EventArg that
you are given for the events in a GridView.

You can search for "FindControl", but that is usually done WITHIN THE
CONTEXT OF YOUR GRIDVIEW.
As in, if you have a ddl in inside your GridView, you can find it.



"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:55**********************************@microsof t.com...
So if i go to quick tasks for the DropDownList that's inside my GridView
EditTemplate and goto EditDataBindings what do I specify to pass the
DropDownList itself as an argument?

"Cowboy (Gregory A. Beamer)" wrote:
Yes, you can pass the sender and EventArgs. In fact, this is done
routinely
to bubble up information (like from a control to a page).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:B8**********************************@microsof t.com...
hey all,
i have a dropdownlist inside my gridview and i'm specifying the
datasource
of the dropdownlist as LoadDropDownList. I was wondering if i can pass
it
Sender,Source or something like that? (i.e. LoadDropDownList(sender)?
>
thanks,
rodchar

Nov 9 '06 #4

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

Similar topics

3
by: Todd Schinell | last post by:
Back in July, Jeffery Tan posted this: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=OWOTdf0VDHA.2296%40cpmsftngxa06.phx.gbl In response as to how to get click events from a...
8
by: Phill | last post by:
All the event handlers seem to pass an Object and an EventArgs object. If the event doesn't need this info why pass them anyway? It is inefficient.
3
by: sloan | last post by:
How does one "pass thru" a Raised Event.... I am using the Adapter Pattern to sync up some different interfaces. http://www.dofactory.com/Patterns/PatternAdapter.aspx My Question is this:
7
by: Rob | last post by:
lets assume I want to remove a control from a form that was dynamically created... If the button was added at design time, I can do the following... me.Controls.Remove(Button4) How may I...
7
by: Boki | last post by:
Hi All, I can't pass data to another form: in form2: private void button1_Click(object sender, EventArgs e) { Form1 form_copy = new Form1();
2
by: | last post by:
I have a gridview with a textbox in an ItemTemplate, as below. The OnTextChanged event fires okay but how do I pass a parameter to it, I get an error when I try "OnTextChanged(""SomeData"")". I...
14
by: =?Utf-8?B?Umljaw==?= | last post by:
I have seen examples of passing data from FormB to FormA (Parent To Child) but I need an example of passind data from FormA to FormB. My main form is FormA; I will enter some data in textboxes and...
24
by: =?Utf-8?B?U3dhcHB5?= | last post by:
Can anyone suggest me to pass more parameters other than two parameter for events like the following? Event: Onbutton_click(object sender, EventArgs e)" Event handler: button.Click += new...
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
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
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...

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.