I have a RadGrid control and I’m defining the Edit Form for it.
I have added a text box to bind data to as below which works fine:
<asp:TextBox ID="tbAuthenticationMode" runat="server" Text='<%# Bind("AuthenticationMode") %>' CssClass="tbAuthenticationMode">
</asp:TextBox>
Now, I’d like to remove this text box and replace it with a simple drop down list as below:
<asp:DropDownList ID="ddlAuthenticationMode" runat="server">
<asp:ListItem Text="Windows Authentication" Value="Windows"></asp:ListItem>
<asp:ListItem Text="SQL Server Authentication" Value="SqlServer"></asp:ListItem>
</asp:DropDownList>
What I’d like to happen is that the “AuthenticatioMode” value to be bound to this drop down list.
How would it be possible?
Thanks
You must first override the RadGrid’s
ItemCreatedevent. Then check if the event’s item editable and en edit mode. Then you can bind data to it. Here’s a code sample: