Problem in Rad combobox

2 posts, 0 answers
  1. Mugil
    Mugil avatar
    21 posts
    Member since:
    Mar 2013

    Posted 20 Mar 2013 Link to this post


            when i filter the radgrid using rad combobox its filtering
            but problem is in the after getting filter in the radcombobox the value binded in two time

            for ur clarrification i just attached two diiferent files pls refer it and give the solution

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 21 Mar 2013 Link to this post


    It is very difficult to replicate the issue without inspecting the code. Please take a look into the following code snippet I tried to Filter a field using RadComboBox.

    <telerik:RadGrid ID="RadGridFilter" runat="server" OnItemDataBound="RadGridFilter_ItemDataBound"
        OnNeedDataSource="RadGridFilter_NeedDataSource" AllowFilteringByColumn="true"
                <telerik:GridBoundColumn DataField="OrderID" HeaderText="OrderID" SortExpression="OrderID"
                        <telerik:RadComboBox runat="server" ID="FilterCombo" AutoPostBack="true" OnSelectedIndexChanged="FilterCombo_SelectedIndexChanged">

    protected void RadGridFilter_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        string selectQuery1 = "select top 10 OrderID from Orders";
        SqlDataAdapter adapter1 = new SqlDataAdapter(selectQuery1, conn);
        RadGridFilter.DataSource = dt1;       
    protected void RadGridFilter_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
        if (e.Item is GridFilteringItem)
            GridFilteringItem Fitem = (GridFilteringItem)e.Item;
            RadComboBox FilterCombo = (RadComboBox)Fitem.FindControl("FilterCombo");
            FilterCombo.DataSource = dt1;
            FilterCombo.DataTextField = "OrderID";
            FilterCombo.DataValueField = "OrderID";
    protected void FilterCombo_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
        string filterExpression;
        filterExpression = "([OrderID] = '" + e.Value + "')";
        RadGridFilter.MasterTableView.FilterExpression = filterExpression;

    Please elaborate the scenario or provide the code if it doesn't help.

Back to Top