Updating a GridView control using a DropDownList

By pbasehore ·
I am writing an ASPX page that incorporates a dropdown list and a gridview. I want to update my gridview when my dropdownlist's selectedvaluechanged event is triggered. This is ASPX with VB, not C#. More details follow:

-> I have turned on Auto Postback on my dropdown list. Doing tests with a textbox shows that the postback is indeed posting back.

-> The SelectedValue of my dropdownlist is a parameter in the SQL statement that drives my gridview. It works on page load; it is the postback that is not working correctly.

-> I tried using a ForEach loop to do an update row for each row in the gridview, but it didn't work because the datatype "GridViewRow" is not an integer.

-> My dropdownlist is not embedded inside my gridview. So far that is the only thing I have found in my online searches, so I just wanted to make that clear.

I was thinking on trying to add something to the DropDownList.SelectedValueChanged event, but I wasn't sure what to add or what the syntax would be. I saw something online about an UpdatePanel control, but there is no such control in my toolbox (I am running VisualStudio.NET 2005). Is that something I need to try to find?

Any help would be much appreciated!

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Share your knowledge
Back to Software Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums