Hi again,
Okay, I decided the GridView is the way to go to solve my problem. But now I've got another problem.
I've found plenty of examples about how to add a DropDownList item to the grid view, how to bind it and how to add the selection items to the list. My problem is that in all the examples I can find all show how to add the selection items from a database only. I don't always want to do that. Sometimes I want to add just from a predefined list of values.
For example:
(I haven't done the binding step yet). In the examples I've found, the GetColors() method selects from a database. Instead, I want to simply have the selections 'RED', 'BLUE', 'GREEN' only. Whatever the user enters will eventually get stored to the database via the binding.
Help! Again, I ask your patience as I'm rather new to this.
Robert
Okay, I decided the GridView is the way to go to solve my problem. But now I've got another problem.
I've found plenty of examples about how to add a DropDownList item to the grid view, how to bind it and how to add the selection items to the list. My problem is that in all the examples I can find all show how to add the selection items from a database only. I don't always want to do that. Sometimes I want to add just from a predefined list of values.
For example:
Code:
<asp:TemplateField HeaderText="Color">
<ItemTemplate>
<asp:DropDownList DataSource="<%# GetColors() %>
DataTextField="Color" DataValueField="Color"
ID="ddlColor" runat="server">
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
Help! Again, I ask your patience as I'm rather new to this.
Robert
Comment