Hi
I am creating my grid (with nested view) fully in code-behind & it all works fine when I set 'NestedViewTemplate' to my custom template class. What I was wondering is whether I could use an ascx instead of a ITemplate class?
Out of interest I took a long shot and tried this but it doesn't work:
I am creating my grid (with nested view) fully in code-behind & it all works fine when I set 'NestedViewTemplate' to my custom template class. What I was wondering is whether I could use an ascx instead of a ITemplate class?
Out of interest I took a long shot and tried this but it doesn't work:
public class ChildTable :ITemplate
{
public void InstantiateIn(System.Web.UI.Control container)
{
Table tb = new Table();
TableRow tr = new TableRow();
TableCell td = new TableCell();
TextBox txt = new TextBox();
MyUserControl uc = new MyUserControl();
td.Controls.Add(uc);
tr.Cells.Add(td);
tb.Rows.Add(tr);
container.Controls.Add(tb);
}
}