Hi,
I have a checkbox control programmaticall y created for each row in the datagrid but CheckedChanged event not firing when state of the checkbox changes.
I use the following code to instantiate ItemTemplate with checkbox contructor:
public class TemplateObject : ITemplate {
public void InstantiateIn(C ontrol objContainer) {
CheckBox objCheckBox = new CheckBox();
objCheckBox.ID = "Item";
objCheckBox.Che ckedChanged +=new EventHandler(ob jCheckBox_Check edChanged);
objContainer.Co ntrols.Add(objC heckBox);
}
public void objCheckBox_Che ckedChanged(obj ect sender, EventArgs e) {
CheckBox objCheckBox = (CheckBox)sende r;
if(objCheckBox. Checked) {
//Do Something
}
}
}
Any advice much appreciated.
Andrew
---
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.