Hi all,
i have a dynamically created GridView with a CheckBox by means of TemplateField.ItemTemplate. Now i want to add an EventHandler (CheckedChanged) on it. Is this possible?
TemplateField tempField = new TemplateField();
itemplateCheckBox chb = new itemplateCheckBox(dc_.ColumnName, GridView2);
tempField.ItemTemplate = chb;
tempField.HeaderText = dc_.ColumnName;
GridView2.Columns.Add(tempField);
-------------------------------------------------------------
public void InstantiateIn(Control container)
{
CheckBox cb = new CheckBox();
cb.DataBinding += new EventHandler(this.bindBooleans);
cb.CheckedChanged += new EventHandler(this.checkBoxChanged);
container.Controls.Add(cb);
}
View Complete Post