using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
using System.Collections.Generic;

public partial class Default : System.Web.UI.Page
{
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);

        Radgrid1.NeedDataSource += new GridNeedDataSourceEventHandler(Radgrid1_NeedDataSource);
        Radgrid1.ItemDataBound += new GridItemEventHandler(Radgrid1_ItemDataBound);

    }

    void Radgrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            List<string> data = new List<string>() { "First", "Second", "Third", "Fourth" };
            GridDataItem item = e.Item as GridDataItem;
            Table t = new Table();
            foreach (string s in data)
            {
                TableRow row = new TableRow();
                TableCell cell = new TableCell();
                cell.Text = s;

                row.Cells.Add(cell);
                t.Rows.Add(row);
            }
            item["Item"].Controls.Add(t);
        }
    }

    void Radgrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
        DataTable table = new DataTable();
        table.Columns.Add("ID");
        table.Columns.Add("Item");
        table.Columns.Add("Date", typeof(DateTime));
        for (int i = 1; i < 8; i++)
        {
            table.Rows.Add(i, "Item" + i.ToString(), DateTime.Now.AddDays(i));
        }
        Radgrid1.DataSource = table;
    }
}
