using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.WebControls;
using System.Data.OleDb;
using System.Reflection;
using System.Web.Mail;
using System.Net;
using System.Net.Mail;
using System.Text;

public partial class _Default : System.Web.UI.Page
{

    protected void RadGrid1_PreRender(object sender, EventArgs e)
    {
        foreach (GridDataItem dataItem in RadGrid1.MasterTableView.Items)
        {
            CheckBox box = (CheckBox)dataItem["Template1"].FindControl("CheckBox1");
            box.Attributes.Add("onclick", "checkChildren('" + box.ClientID + "');");
        }
    }
}
