<asp:GridView ID="gridUserAccounts" runat="server" DataSourceID="UserAccounts_DS" CssClass="GridMain" AutoGenerateColumns="False" AllowPaging="True" AllowSorting="True" PageSize="10"
AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" GridLines="None" OnRowDeleting="gridUserAccounts_RowDeleting" OnRowDeleted="gridUserAccounts_RowDeleted" DataKeyNames="UserName, UserId">
<alternatingrowstyle backcolor="#ffffff" />
<rowstyle cssclass="GridRow" />
<HeaderStyle CssClass="GridHeader" ForeColor="#ffffff"/>
<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:TemplateField HeaderText="Role Name" SortExpression="RoleName">
<EditItemTemplate>
<asp:DropDownList ID="ddlRole" runat="server" DataSourceID="UserAccounts_DS" DataTextField="RoleName" DataValueField="RoleId" SelectedValue='<%# Bind("RoleId") %>' >
</asp:DropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("RoleName") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:CheckBoxField DataField="IsApproved" HeaderText="Approved"/>
</columns>
</asp:GridView>
<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="UserAccounts_DS" DataTextField="RoleName" DataValueField="RoleId" SelectedValue='<%# Bind("RoleId") %>' >
<asp:ListItem Value="1">1</asp:ListItem>
<asp:ListItem Value="2">2</asp:ListItem>
<asp:ListItem Value="3">3</asp:ListItem>
</asp:DropDownList>