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 Tickets_327691_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        List<Order> orders = new List<Order>();
        for (int i = 0; i < 5; i++)
        {
            Order order = new Order();
            order.Id = i;
            order.ListOrderDetail = new List<OrderDetail>();
            for (int j = 0; j < 3; j++)
            {
                OrderDetail detail = new OrderDetail();
                detail.Article = String.Format("Order {0} Detail {1} Article Text", i, j);
                detail.Qte = 10 % (j + 1);
                detail.Price = 10d / (j + 1);

                order.ListOrderDetail.Add(detail);
            }

            orders.Add(order);
        }

        RadGrid1.DataSource = orders;
    }

    protected void RadGrid1_DetailTableDataBind(object sende, GridDetailTableDataBindEventArgs e)
    {
        e.DetailTableView.DataSource = ((Order)e.DetailTableView.ParentItem.DataItem).ListOrderDetail;
    }
}

public class Order
{
    public Order()
    {
    }

    public int Id { get; set; }
    public List<OrderDetail> ListOrderDetail { get; set; }
}
public class OrderDetail
{
    public OrderDetail()
    {
    }
    public string Article { get; set; }
    public int Qte { get; set; }
    public double Price { get; set; }
    public double PriceHT { get { return Qte * Price; } }
}
