Hi,
I am trying to change at run the way a template column's items are edited.
I tried this without success:
protected void OnGridPreRender(object sender, EventArgs e)
{
((C1.Web.C1WebGrid.C1TemplateColumn) wgGrid.Columns[3]).EditItemTemplate = LoadTemplate("ValidateEditTemplate.ascx");
wgGrid.DataBind();
}
ValidateEditTemplate.ascx:
<%
@ Control Language="C#" AutoEventWireup="true" CodeFile="ValidateEditTemplate.ascx.cs" Inherits="ValidateEditTemplate" %>
<asp:DropDownList ID="status" runat="server">
<asp:ListItem>Your choice?</asp:ListItem>
<asp:ListItem>Accepted</asp:ListItem>
<asp:ListItem>Not accepted</asp:ListItem>
</asp:DropDownList>
<asp:textbox ID="Textbox8" runat="server" Text='<%# Bind("Value") %>' width="40px" />
Is it anything I'm missing here?
Thanks in advance for any help!
Eric
NB: I think the ascx is valid since it works when I copy it in the <EditItemTemplate> tag of the grid.