ASP.NET dropdownlist refresh gridview

Does someone have an example of how a dropdownlist selection can populate the content of a gridview based on the selection?

I have a sqldatasource that populates the dropdownlist when the form loads and I'd like to fire off the SelectCommand for the second data source which is tied to the gridview. I tried putting a SqlDataSource.select() command under the ddl_vendor_list_TextChanged subroutine but its not recognizing the datasource.

Any examples?
Thanks!!
wppiexpertsAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
digitalZoConnect With a Mentor Commented:
DataValueField = "hidden value OR the value used in the select statement"
DataTextField = "the value which you want to display"

It applies to DropDownList.
0
 
pablo_munozCommented:
Why not call a function on your event that returns a datatable to populate the Gridview?
0
 
wppiexpertsAuthor Commented:
I think I'm getting closer....if I'm pulling in two values to populate my dropdownlist (one is the value to use in the select statement and one is the displayed value)...how do I reference the "hidden" value that is used to populate the dropdownlist? All I seem to be able to reference is the selected value.
0
 
brwwigginsIT ManagerCommented:
If you run through the wizard I think it gives you the option to select which value of the ddl you want to use. I'd have to lookup some code for it
0
 
brwwigginsIT ManagerCommented:
I might retract my previous statement, I think you can only do the selected value but you should be able to configure your dropdownlist accordingly
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.