RadFilter - error on PostPack "Specified argument was out of the range of valid values"

4 posts, 0 answers
  1. Paul
    Paul avatar
    2 posts
    Member since:
    Jun 2010

    Posted 17 Jun 2010 Link to this post

    Hi,

    I am trying to use the RadFilter to create a customer filter. The code is as follows:

    <%

    @ Control Language="vb" AutoEventWireup="false" CodeBehind="ReportCriteria.ascx.vb" Inherits="xxx.ReportCriteria" %>

     

    <%

    @ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

     


     <telerik:RadFilter runat="server" ID="RadFilter1" 
            OnApplyExpressions="RadFilter1_ApplyExpressions">  
                <FieldEditors> 
                    <telerik:RadFilterBooleanFieldEditor FieldName="Some Bool" /> 
                    <telerik:RadFilterTextFieldEditor FieldName="Some Text" /> 
                </FieldEditors> 
            </telerik:RadFilter> 

    and the code behind is...
    Imports Telerik.Web.UI  
     
    Partial Public Class ReportCriteria  
        Inherits System.Web.UI.UserControl  
     
        Protected Sub RadFilter1_ApplyExpressions(ByVal sender As ObjectByVal e As Telerik.Web.UI.RadFilterApplyExpressionsEventArgs)  
            Dim provider As New RadFilterSqlQueryProvider()  
            provider.ProcessGroup(e.ExpressionRoot)  
            ltlDebug.Text = provider.Result  
        End Sub 
     
    End Class 

    The filter displays correctly, and I can add criteria. However, as soon as I change the condition from 'Some Bool' to 'Some Text' I get the following error:

    Specified argument was out of the range of valid values.
    Parameter name: HierarchicalIndex


    [ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
    Parameter name: HierarchicalIndex]
       Telerik.Web.UI.RadFilterItemsCollection.get_Item(String hierarchicalIndex) +63
       Telerik.Web.UI.RadFilter.HandleClientCommand(String commandName, String commandArgs) +505
       Telerik.Web.UI.RadFilter.RaisePostBackEvent(String eventArgument) +82
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
    


    Any ideas? 

    Thanks.
  2. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 17 Jun 2010 Link to this post

    Hello Paul,

    Can you tell exact version of RadControls for ASP.NET AJAX that you are using? You can also try latest SP2 of RadControls for ASP.NET AJAX and see whether the error still appear.

    Regards,
    Nikolay
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Paul
    Paul avatar
    2 posts
    Member since:
    Jun 2010

    Posted 17 Jun 2010 Link to this post

    Hi, thanks for the reply but a colleague found the solution which is aparently an issue with the Telerik library.

    The web applications web.config has the following line:

     

     

    <xhtmlConformance mode="Legacy" />   
     
     

    In order to get the control to work correctly, the xhtml conformance had to be set to "Strict" for the page it was on.

    One way to do that is like so:
     

     

    <location path="xxx.aspx">  
        <system.web> 
          <xhtmlConformance mode="Strict" /> 
        </system.web> 
      </location> 

     

  5. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 22 Jun 2010 Link to this post

    Hello Paul,

    Indeed you should not use <xhtmlConformance mode="Legacy"/> with ASP.NET AJAX controls. Bellow you will find more details:
    http://weblogs.asp.net/scottgu/archive/2006/12/10/gotcha-don-t-use-xhtmlconformance-mode-legacy-with-asp-net-ajax.aspx

    Regards,
    Nikolay
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
Back to Top