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 void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            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;
        }
    }

    protected void RadGrid1_SelectedIndexChanged(object sender, EventArgs e)
    {
        int lastSelectedIndex = Convert.ToInt32(RadGrid1.SelectedIndexes[RadGrid1.SelectedIndexes.Count - 1]);
    }
}
