Link to home
Start Free TrialLog in
Avatar of hfp06
hfp06Flag for United States of America

asked on

trigger database update when dropdownlist item selected in gridview not in edit mode

I have a gridview that list some records.  In each row, I have a dropdownlist that is used to categorize the record. I want users to be able to select a dropdownlist item and then trigger some event so I can update that record in the database with that value.  I want to do this with out the user having to hit an edit button.   I am using Visual Studio 2008 and prefer a VB example, but C# will do as well.  Thanks.
SOLUTION
Avatar of amar31282
amar31282
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hfp06

ASKER

I set the autopostback property of the dropdown to TRUE but it does not seem to fire the gridview's RowCommand event.  I put an image button in the same column and if I click that it generates the RowCommand event but the dropdownlist does nothing except generate the post back that I can see.  
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,
newbie to C#.  what would the C# code look like to accomplish this?
Thanks.