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.Xml.Schema;

public partial class Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }

    protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        (sender as RadGrid).DataSource = GetSampleData();
    }

    private DataTable GetSampleData()
    {
        DataTable dt = new DataTable();

        // Add columns
        dt.Columns.Add("ReservationKey", typeof(int));
        dt.Columns.Add("Status", typeof(string));
        dt.Columns.Add("ReservationType", typeof(string));
        dt.Columns.Add("Company", typeof(string));
        dt.Columns.Add("RoomType", typeof(string));
        dt.Columns.Add("Balance", typeof(decimal));

        // Add rows
        for (int i = 1; i <= 20; i++)
        {
            DataRow row = dt.NewRow();
            row["ReservationKey"] = i;
            row["Status"] = (i % 2 == 0) ? "Confirmed" : "Pending";
            row["ReservationType"] = (i % 3 == 0) ? "Corporate" : "Leisure";
            row["Company"] = "Company " + i;
            row["RoomType"] = (i % 4 == 0) ? "Suite" : "Standard";
            row["Balance"] = i * 100.50m;
            dt.Rows.Add(row);
        }

        return dt;
    }

    protected void RadGrid1_SortCommand(object sender, GridSortCommandEventArgs e)
    {

    }

    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {

    }

    protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
    {

    }
}
