Hello,
I have a page that contains a RadGrid, and I would like to be able to open a RadWindow which contains a RadFilter for the grid. My current implementation has all 3 objects on the same page (Default.aspx). The RadWindow does not open a new URL, instead it contains the RadFilter in a ContentTemplate declaration:
The RadWindow is opened with the following javascript:
The window opens just fine, and the RadFilter appears normally. The problem is that as soon as I press the "Add expression" button on the RadFilter, the following error is thrown:
Translation of the error message: The index was out of bounds. It cannot be negative, and must be less than the size of the collection. Parameter name: index.
I have tried too many variations on the above code to count, and I'm all out of ideas. Your help is greatly appreciated.
Thanks in advance,
Marc
I have a page that contains a RadGrid, and I would like to be able to open a RadWindow which contains a RadFilter for the grid. My current implementation has all 3 objects on the same page (Default.aspx). The RadWindow does not open a new URL, instead it contains the RadFilter in a ContentTemplate declaration:
<!-- The window opened by the "Filter Builder" toolbar button --> |
<telerik:RadAjaxPanel runat="server" ID="WindowAjaxPanel"> |
<telerik:RadWindowManager ID="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false" |
runat="server" Skin="Office2007"> |
<Windows> |
<telerik:RadWindow ID="FilterBuilderWindow" runat="server" Behaviors="Close" Title="Filter Builder" |
Width="350" Height="350" EnableViewState="true"> |
<ContentTemplate> |
<asp:Panel ID="FilterContentPanel" runat="server" CssClass="filterDialogContent"> |
<asp:Panel ID="FilterPanel" runat="server" CssClass="filterTree"> |
<telerik:RadFilter runat="server" ID="FilterControl" RegisterWithScriptManager="true" |
FilterContainerID="OrderFulfillmentGrid" |
ShowApplyButton="false" Skin="Office2007"/> |
</asp:Panel> |
<asp:Panel ID="FilterButtonPanel" runat="server" CssClass="filterButtonPanel"> |
<asp:Button runat="server" ID="filterBuilderOK" OnClick="filterBuilderOK_Click" Text="OK" /> |
<asp:Button runat="server" ID="filterBuilderCancel" Text="Cancel" |
OnClick="filterBuilderCancel_Click" /> |
<asp:Button runat="server" ID="filterBuilderApply" OnClick="filterBuilderApply_Click" |
Text="Apply" /> |
</asp:Panel> |
</asp:Panel> |
</ContentTemplate> |
</telerik:RadWindow> |
</Windows> |
</telerik:RadWindowManager> |
</telerik:RadAjaxPanel> |
The RadWindow is opened with the following javascript:
// Open the Filter Builder dialog |
function openFilterBuilderDialog() { |
window.radopen(null, "FilterBuilderWindow"); |
return false; |
} |
The window opens just fine, and the RadFilter appears normally. The problem is that as soon as I press the "Add expression" button on the RadFilter, the following error is thrown:
Erreur du serveur dans l'application '/'. |
-------------------------------------------------------------------------------- |
L'index était hors limites. Il ne doit pas être négatif et doit être inférieur à la taille de la collection. |
Nom du paramètre : index |
Description : Une exception non gérée s'est produite au moment de l'exécution de la demande Web actuelle. Contrôlez la trace de la pile pour plus d'informations sur l'erreur et son origine dans le code. |
Détails de l'exception: System.ArgumentOutOfRangeException: L'index était hors limites. Il ne doit pas être négatif et doit être inférieur à la taille de la collection. |
Nom du paramètre : index |
Erreur source: |
Une exception non gérée s'est produite lors de l'exécution de la demande Web actuelle. Les informations relatives à l'origine et l'emplacement de l'exception peuvent être identifiées en utilisant la trace de la pile d'exception ci-dessous. |
Trace de la pile: |
[ArgumentOutOfRangeException: L'index était hors limites. Il ne doit pas être négatif et doit être inférieur à la taille de la collection. |
Nom du paramètre : index] |
System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) +64 |
System.ThrowHelper.ThrowArgumentOutOfRangeException() +15 |
System.Collections.Generic.List`1.get_Item(Int32 index) +7497276 |
Telerik.Web.UI.RadFilterDataFieldEditorCollection.System.Collections.Generic.IList<Telerik.Web.UI.RadFilterDataFieldEditor>.get_Item(Int32 index) +41 |
Telerik.Web.UI.RadFilterDataFieldEditorCollection.get_Item(Int32 index) +37 |
Telerik.Web.UI.RadFilter.AddChildExpression(RadFilterGroupExpressionItem groupItem, Boolean isGroup) +121 |
Telerik.Web.UI.RadFilterCommandEventArgs.ExecuteCommand(Object source) +279 |
Telerik.Web.UI.RadFilter.OnBubbleEvent(Object source, EventArgs args) +196 |
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 |
Telerik.Web.UI.RadFilterExpressionItem.OnBubbleEvent(Object source, EventArgs args) +113 |
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 |
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +118 |
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135 |
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 |
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 |
I have tried too many variations on the above code to count, and I'm all out of ideas. Your help is greatly appreciated.
Thanks in advance,
Marc