Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: How to capture SelectedIndexchanged event of dropdownlist in Datagrid

Reply
Thread Tools

Re: How to capture SelectedIndexchanged event of dropdownlist in Datagrid

 
 
Arthur Dent
Guest
Posts: n/a
 
      12-23-2004
This is what i would do... (little roundabout, but it works)

1. put a drop down on the form normally
2. dblclick it and get the codebehind function generated
3. rename the handler function something appropriate (eg.
GridLst_SelectedIndexChanged)
3. change the handler to be Protected instead of Private
4. delete the temporary drop down (but Not the handler)
5. go to the HTML view of your aspx page, and find your drop down list
6. add an attribute to the list as follows, using your handler function
name:
onchange="GrdLst_SelectedIndexChanged"

That should do it for you. The handler function will not be called right
away, until something else causes the form to postback. If you want it to
fire immediately on change, set AutoPostBack = True.

HTH.
CheerZ.

"Uma Shanmugam via .NET 247" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
(Type your message here)

--------------------------------
From: Uma Shanmugam

Everyone,
I have a datagrid and it has a dropdownlist in the Edit mode.I want to
capture the selectedIndexChanged event of the dropdownlist. I tried
ItemCommand event and then realised that it is fired when a button is
clicked.Any help will be greatly appreciated.

Thanks in Advance
Uma Shanmugam

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>LxFjJ2mX9kSY0YuzKKv4cQ==</Id>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How to capture SelectedIndexchanged event of dropdownlist in Datagrid Shiva ASP .Net 3 06-14-2012 09:35 AM
Re: How to capture SelectedIndexchanged event of dropdownlist in Datagrid The Colonel ASP .Net 0 01-24-2005 07:10 AM
Re: How to capture SelectedIndexchanged event of dropdownlist in Datagrid The Colonel ASP .Net 0 01-24-2005 06:20 AM
Re: How to capture SelectedIndexchanged event of dropdownlist in Datagrid The Colonel ASP .Net 0 01-24-2005 06:17 AM
Re: How to capture SelectedIndexchanged event of dropdownlist in Datagrid Shiva ASP .Net 0 11-17-2004 10:48 AM



Advertisments