Default a RadComboBox Filter

2 posts, 0 answers
  1. Christopher
    Christopher avatar
    1 posts
    Member since:
    Aug 2013

    Posted 20 Aug 2015 Link to this post

    When I try to set a default filter on combobox filter the grid filters correctly but checkboxes in the filter do not display correctly. The filter says "All Items" instead of the two selected items.

     

    01.protected void gridviewRequests_PreRender(object sender, EventArgs e)
    02.{
    03.     gridviewRequests.MasterTableView.FilterExpression = "(ErrorStatus = 'Critical Errors' OR ErrorStatus ='Non-critical Errors')";
    04. 
    05.     GridFilteringItem filterItem = gridviewRequests.MasterTableView.GetItems(GridItemType.FilteringItem)[0] as GridFilteringItem;
    06.     RadComboBox combo = (RadComboBox)filterItem.FindControl("ErrorStatusFilter");
    07.                    combo.Items.FindItemByValue("No Errors").Checked = false;
    08. 
    09.     gridviewRequests.MasterTableView.Rebind();
    10.}

  2. Eyup
    Admin
    Eyup avatar
    3690 posts

    Posted 24 Aug 2015 Link to this post

    Hello Christopher,

    I suggest that you check the explanation provided in the following post:
    http://www.telerik.com/forums/how-to-persist-dropdownlist-selected-index-and-value-on-postback-from-radgrid-filtertemplate#GW3MyQLmVEmy8XzsmrHzeQ

    After making your decision, we can proceed further with the specific implementation.

    Regards,
    Eyup
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top