Template Column

AngelaSoltik

New Member
To add columns in the code behind such as HyperLinkColumn, BoundColumn, ButtonColumn seems easy enougth to do, <BR><BR> HyperLinkColumn lnk = new HyperLinkColumn(); <BR> lnk.DataTextField = "CustomerID"; <BR> lnk.DataNavigateUrlField = "X"; <BR> lnk.HeaderText = "Customer ID"; <BR> MyDataGrid.Columns.Add(lnk); <BR><BR>But How do you add a TemplateColumn in the same way? <BR>Thank-you in advance.Happend across this article today, tells how to create TemplateColumns through code.<BR><BR>Hope it helps.<BR><BR>http://msdn.microsoft.com/msdnmag/issues/02/01/cutting/cutting0201.aspThanks for the tip it really helped.
 
Back
Top