using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        RadGrid1.PreRender += new EventHandler(RadGrid1_PreRender);
    }

    protected void RadGrid1_PreRender(object sender, System.EventArgs e)
    {
        if (RadGrid1.MasterTableView.FilterExpression != string.Empty)
        {
            RefreshCombos();
        }
    }

    protected void RefreshCombos()
    {
        SqlDataSource2.SelectCommand = SqlDataSource2.SelectCommand + " WHERE " + RadGrid1.MasterTableView.FilterExpression.ToString();
        RadGrid1.MasterTableView.Rebind();
    }

}
