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;

public partial class RadGridNestedViewTemplateGrid : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void RadGrid2_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        RadGrid grid = sender as RadGrid;
        GridNestedViewItem nestedViewItem = grid.NamingContainer as GridNestedViewItem;
        GridDataItem parentItem = nestedViewItem.ParentItem as GridDataItem;
        string parentDataKeyID = parentItem.GetDataKeyValue("OrderID").ToString();

        grid.DataSource = new string[] { parentDataKeyID, "Item 2", "Item 3", "Item 4", "Item 5" };
    }
}