<asp:GridView ID="gridUserAccounts" runat="server" AllowPaging="True" AllowSorting="True" CssClass="GridMain" AutoGenerateColumns="False" DataSourceID="UserAccounts_DS" AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" GridLines="None" DataKeyNames="UserId"> <alternatingrowstyle backcolor="#ffffff" /> <rowstyle cssclass="GridRow" /> <HeaderStyle ForeColor="#ffffff" CssClass="GridHeader" /> <footerstyle cssclass="GridHeader" /> <pagerstyle forecolor="#ffffff" backcolor="#003366" /> <columns> <asp:BoundField DataField="UserName" HeaderText="UserName" SortExpression="UserName" /> <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" /> <asp:CheckBoxField DataField="IsApproved" HeaderText="Approved"/> <asp:TemplateField HeaderText="Approved" SortExpression="Approved" /> <asp:TemplateField HeaderText="Role Name"> <edititemtemplate> <asp:DropDownList ID="ddlRole" runat="server" DataSourceID="UserAccounts_DS" DataTextField="RoleName" DataValueField="RoleId" SelectedValue='<%# Bind("RoleId") %>' > </edititemtemplate> <itemtemplate> <asp:Label ID="Label1" runat="server" Text='<%# Bind("RoleName") %>'> </itemtemplate> </columns> This is the code I'm changing it to: <asp:DropDownList ID="ddlRole" DataTextField="RoleId" DataValueField="RoleId" runat="server" AutoPostBack="False"> <asp:ListItem Text="NFI" Value="NFI"> <asp:ListItem Text="Partner" Value="Partner"> <asp:ListItem Text="Customer" Value="Customer">
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)