This is a migrated thread and some comments may be shown as answers.

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

3 Answers 49 Views
Filter
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 17 Jun 2010, 08:03 AM
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.

3 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 17 Jun 2010, 09:45 AM
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
0
Paul
Top achievements
Rank 1
answered on 18 Jun 2010, 12:54 AM
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> 

 

0
Nikolay Rusev
Telerik team
answered on 22 Jun 2010, 12:06 PM
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
Tags
Filter
Asked by
Paul
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Paul
Top achievements
Rank 1
Share this question
or