Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2008

Tip: Looking for answers? Try searching our database.

Does "DropDownList" support the "CommandName" event?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dvanderwel - 07 Feb 2008 01:12 GMT
I have a .NET 1.1 web page with a DataGrid containing a TemplateColumn
that contains a DropDownList.

I need to fire an event when the selected item in the DropDownList
changes for the current DataGrid row, and I'm having trouble figuring
out how to do this.

Other control types I have defined the "CommandName" property in the
aspx file.  The event returns the index of the row that contains the
control, and I can thus pull more data out of the row.

In the case of the DropDownList, the CommandName property is not
available, and I can't figure out how to determine the index of the
DataGridRow that the DropDownList control lives in.

Does anyone know how I can go about doing this?
Coskun SUNALI [MVP] - 07 Feb 2008 02:47 GMT
Hi,

You can access the DropDownList being changed by converting the "sender"
argument of the event to a DropDownList. Then you may access the
DataGridCell and DataGridRow using the dropdown's "Parent" element. Again,
you will need to convert it to the corresponding type.

Signature

All the best,
Coskun SUNALI
MVP ASP/ASP.NET
http://sunali.com
http://www.propeople.dk

>I have a .NET 1.1 web page with a DataGrid containing a TemplateColumn
> that contains a DropDownList.
[quoted text clipped - 12 lines]
>
> Does anyone know how I can go about doing this?
dvanderwel - 07 Feb 2008 17:08 GMT
Cool thanks.

I tried doing that I but I wasn't able to find the DataGridRow within
the Parent element of the DropDownList.

I will look into this again, perhaps I just missed something.

Thanks for the advice.
Coskun SUNALI [MVP] - 07 Feb 2008 19:14 GMT
You are welcome.

Signature

All the best,
Coskun SUNALI
MVP ASP/ASP.NET
http://sunali.com
http://www.propeople.dk

> Cool thanks.
>
[quoted text clipped - 4 lines]
>
> Thanks for the advice.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.