Posted  25 Apr 2009 - 11:36:04


Use DropDownList in a GridView (EditItemTemplate)

You have a GridView and when you edit rows in it, you wish to have a DropDownList to choose from, with data from another table for example.

I had a lot of trouble setting the SelectedValue on the editing row and to update with the correct value that actually updated the row.

I have made a small example project that shows how I solved this. Basically it's some sensitive settings that needs to be in place for it to work, without any extra code.

Please download the file below to get the example project

Sample Project

Marked as helpful by 4 users

1 comment:

3/26/2012 10:12:08 PM  Avijit  wrote:

It's not dynamic binding.So there is so many limitations. In case of server transfer required data-source configuration manually for each connection.

© SolutionCottage 2008-2011 9/26/2017 10:00:24 AM