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

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

    }
    protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
        DataTable table = new DataTable();
        table.Columns.Add("ID");
        table.Columns.Add("Item");
        for (int i = 1; i <= 5; i++)
        {
            DataRow row = table.NewRow();
            row["ID"] = i;
            row["Item"] = "Item" + i.ToString();
            table.Rows.Add(row);
        }
        RadGrid1.DataSource = table;
    }
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        DropDownList ddl1 = sender as DropDownList;
        GridDataItem item = ddl1.Parent.Parent as GridDataItem;
        DropDownList ddl2 = item.FindControl("DropDownList2") as DropDownList;
        ddl2.DataSource = new object[] { ddl1.SelectedValue };
        ddl2.DataBind();
    }
}
