Hi,
Even tough I was able to implement what I want in a weird and non efficient
way, I would like to get an opinion what is the right way to achieve my task:
Scenario:
• Display a DataGrid that contains rows from a table from a databse (so far
easy).
• I would like to add a column to the DataGrid that will be a drop-down list
so the user will be able to select a value from a pre-defined list of values
for every row in the DataGrid. (every row should have a drop-down)
• When the user will post back the form I would like to refer to every value
in the drop-down list by name.
• In order to implement this I used a TemplateColumn in the DataGrid, but I
had a hard time giving a name to the <select> element so I will be able to
refer to it when the form will be posted back. I have used a weird syntax
(with data binding syntax since the container is not the DataGrid but a
DataGrid item) to create a unique name for each one of the <select> elements.
This caused the Design-View in Visual Studio to not be able to display the
page even though it did work at run time.
Somehow I feel that I took the wrong way to display a drop-down for each and
every row in the data grid.
Any opinions?
--
Thanks
Eric