Click here to Skip to main content
15,922,696 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a grid view in every row there will be dropdown list usel will select color in that , problem is how do i display colors i dont have a idea

What I have tried:

<asp:GridView ID="GridView1" runat="server" HeaderStyle-BackColor="#3AC0F2" HeaderStyle-ForeColor="White"
AutoGenerateColumns="false" >
<columns>
<asp:templatefield>
<itemtemplate>
<asp:CheckBox ID="chkRow" runat="server" onselectedindexchanged="chkRow_SelectedIndexChanged" />



<asp:TemplateField HeaderText="Country" ItemStyle-Width="150">
<itemtemplate>
<asp:Label ID="trackerid" runat="server" Text='<%# Eval("trackerid") %>'>





<asp:templatefield>
<itemtemplate>
<asp:DropDownList ID="DropDownList1" runat="server">


<asp:ListItem Text="--Select---" Value="0">
<asp:ListItem Text="red" Value="1">
<asp:ListItem Text="yellow" Value="2">
<asp:ListItem Text="green" Value="3">
<asp:ListItem Text="blue" Value="4">
<asp:ListItem Text="black" Value="5">
<asp:ListItem Text="white" Value="6">
Posted
Updated 31-Jan-17 0:31am

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900