Gridview Edit mode Dropdown

jamie_pattison

Well-known member
Joined
Sep 9, 2008
Messages
116
Programming Experience
Beginner
I have a SQL statement that brings back a few rows which is then linked to my data access and in turn is linked in my Business Layer.

The statement is similar to

SELECT col1ID, col2, col3, col4ID, (SELECT value from Sometable where sometable.ID = Table.col4ID) As Country From Table WHERE colID = @ColID

Sometable: CountryID and CountryName

I then add an ObjectDataSource (with an update command setup) and link it up to my Gridview passing in the value from another control. Now i have Edit mode enabled on the GV, inside edit mode for Col4 i want to add a dropdown so when the row loads the dropdown has the correct value for that row and if i change the value in the dropdown that value is then updated.

Question is with my setup above could i achieve this? If yes how do i do this and whats required for it to work? I did search around the internet but most were examples that either wasnt close to my setup or were too simple.

Thanks
 
Back
Top