I'm trying to use a GridView to display a list of components in ASP.NET. I'm trying to make it editable at the same time. One of the columns is a string that should be selected out of a list when the user edits the row.
So I've tried the following:
- Convert the BoundField row to an ItemTemplate
- Add a dropbox to the template window in the gridview
- bound the selecteditem to the string
At this point, I get an error because the list items haven't been set up in the dropbox. So I guess the two things I'm wondering are:
- How do I assign the items in the dropbox to a dynamically created list of options?
- How do I make the dropbox only appear when the row is being edited?
Ok so I've discovered the "EditItemTemplate" field in visual studio, that answers #2.
And now I've discovered that the dropbox has a datasource field which can be linked to a property in the data object, and that holds the options list.