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;

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

        gvSPInbox.NeedDataSource += new GridNeedDataSourceEventHandler(gvSPInbox_NeedDataSource);
    }

    void gvSPInbox_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        DataTable table = new DataTable();
        table.Columns.Add("TimesheetID");
        table.Columns.Add("IntegerRegionCode");
        table.Columns.Add("TerritoryCode");
        table.Columns.Add("WeekEnding");
        table.Columns.Add("Status");
        table.Columns.Add("RejectionDesc");
        table.Columns.Add("ShowDetails");
        for (int i = 1; i < 20; i++)
        {
            if (i > 5)
            {
                table.Rows.Add(i, i + 1, i + 2, i, "Pending", true, true);
            }
            else
            {
                table.Rows.Add(i, i + 1, i + 2, i, "Rejected", true, true);
            }
        }
        gvSPInbox.DataSource = table;
    }
}
