Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
30
how to add control to dynamic template field in webdatagrid from server side
posted

// Create our template column.
TemplateDataField templateField1 = new TemplateDataField(true);
templateField1.Key = "TemplateField1";
templateField1.Header.Text = "Template Column";
templateField1.ItemTemplate.InstantiateIn(LiteralDisplayName);
WebDataGrid1.Columns.Add(templateField1);

divHeader.Controls.Add(LiteralHeader);
//divDisplayName.Controls.Add(LiteralDisplayName);
divDisplayName.Controls.Add(WebDataGrid1);