Changing default group operator

2 posts, 0 answers
  1. Mark DeMichele
    Mark DeMichele avatar
    74 posts
    Member since:
    Oct 2005

    Posted 12 Aug 2011 Link to this post


    With regards to the RadFilter, how would one change the default group operator whenever a group is created? Specifically, I'd like each group to default to OR instead of AND.
  2. Mira
    Mira avatar
    1124 posts

    Posted 17 Aug 2011 Link to this post

    Hello Mark,

    Please use the following code in order to implement the desired functionality:
    protected void Page_Load(object sender, EventArgs e)
        if (!IsPostBack)
            RadFilter1.RootGroup.GroupOperation = RadFilterGroupOperation.Or;
    protected void RadFilter1_ItemCommand(object sender, RadFilterCommandEventArgs e)
        if (e.CommandName == RadFilter.AddGroupCommandName)
            e.Canceled = true;
            RadFilterGroupExpression group1 = new RadFilterGroupExpression();
            group1.GroupOperation = RadFilterGroupOperation.Or;
            (e.ExpressionItem as Telerik.Web.UI.RadFilterGroupExpressionItem).Expression.AddExpression(group1);

    I hope it helps.

    Best wishes,
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top