or
Dim oChooser As RadComboBox = CType(oSkinManager.FindControl("SkinChooser"), RadComboBox)For Each Item As RadComboBoxItem In oChooser.Items...templateColumn = new GridTemplateColumn();templateColumnName = "Billing Number"this._RadGrid1.MasterTableView.Columns.Add(templateColumn);templateColumn.ItemTemplate = new TextBoxTemplate(templateColumnName);templateColumn.HeaderText = templateColumnName;;templateColumn.DataField = templateColumnName;templateColumn.AllowFiltering = false; public class TextBoxTemplate : ITemplate { protected RadTextBox _textBox; string _columnName; public TextBoxTemplate(string columnName) { this._columnName = columnName; } public void InstantiateIn(System.Web.UI.Control container) { this._textBox = new RadTextBox(); this._textBox.ID = this._columnName; container.Controls.Add(this._textBox); this._textBox.DataBinding += new EventHandler(_textBox_DataBinding); } void _textBox_DataBinding(object sender, EventArgs e) { RadTextBox txt = (RadTextBox)sender; GridDataItem container = (GridDataItem)txt.NamingContainer; txt.Text = ((DataRowView)container.DataItem)[this._columnName].ToString(); }}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </head> <body> <table width="600" cellspacing="0" cellpadding="0" border="0" align="center"> <tbody> <tr> <td> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td valign="top"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td valign="top"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td valign="top" style="background-color: #616265;"> </td> </tr> <tr> <td> <table width="100%" cellspacing="20" cellpadding="0" border="0"> <tbody> <tr> <td> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> </tbody> </table> </td> </tr> </tbody> </table> </td> </tr> <tr> <td style="background-color: #616265;"> <table width="100%" cellspacing="20" cellpadding="0" border="0"> <tbody> <tr> <td> <table width="100%" cellspacing="0" cellpadding="0" border="0"> </table> </td> </tr> </tbody> </table> </td> </tr> <tr> <td style="width: 556px; background-color: #bdbdbd;"><br /> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </td> <td style="width: 22px; background-color: #bdbdbd;"><br /> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <br /> <br /> <br /> </body></html>