Problem in event generation of dynamically generated CheckBox
<p>I have a datagrid with dynamically generated checkbox column..I am not able to 
generate the checkedChanged event for the checkbox..</p>

<p>Here is my code:</p>

<pre><code>public class ItemTemplate : ITemplate
{
    //Instantiates the checkbox
    void ITemplate.InstantiateIn(Control container)
    {
        CheckBox box = new CheckBox();            
        box.CheckedChanged += new EventHandler(this.OnCheckChanged);
        box.AutoPostBack = true;
        box.EnableViewState = true;
        box.Text = text;
        box.ID = id;
        container.Controls.Add(box);
    }

    public event EventHandler CheckedChanged;

    private void OnCheckChanged(object sender, EventArgs e)
    {
        if (CheckedChanged != null)
        {
            CheckedChanged(sender, e);
        }
    }
}
</code></pre>

<p>and Here is the event</p>

<pre><code>private void OnCheckChanged(object sender, EventArgs e)
{

}
</code></pre>

<p>Thanks In advance</p>
