using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using Telerik.ReportViewer.WebForms;

namespace WebApplication2
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            RadGrid1.DataSource = new string[] { "1", "2"};
            RadGrid1.DataBind();
        }

        protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
        {
            if (e.Item is GridNestedViewItem)
            {
                System.Web.UI.WebControls.Panel panel = e.Item.FindControl("NestedViewPanel") as System.Web.UI.WebControls.Panel;
                if (panel != null)
                {
                    ReportViewer reportViewer = panel.FindControl("ReportViewer1") as ReportViewer;
                    // create reporting instance  
                    Report1 batchReport = new Report1();
                    reportViewer.Report = batchReport;
                }
            }  
        }
    }
}
