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

[Solved] The specified value cannot be set on CurrentPageIndex

1 Answer 220 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jomey
Top achievements
Rank 1
Jomey asked on 06 Apr 2009, 11:20 PM
When filtering in radgrid using the basic built in filtering on a page greater than 1, I get the following error:

The specified value cannot be set on CurrentPageIndex
Specified argument was out of the range of valid values. Parameter name: value

Seems like when the CurrentPageIndex is greater than 1 it doesn't like to filter.

Is there a workaround?  - when filtering 1st set CurrentPageIndex to 1?

I am using MyCustomFilteringColumn for one of the columns in the grid filter.

I am using version 2008.2.723.35

If I set AutoPostBackOnFilter=true.  This problem goes away.  But I don't want to AutoPostBackOnFilter - since when I have this true and I click on the filter menu it automatically refreshes the 1st time without me picking anything from the menu.

Detailed errors:

Message: The specified value cannot be set on CurrentPageIndex
Source: Telerik.Web.UI
Target Site: Void ExecuteCommand(System.Object)
Stack trace: at Telerik.Web.UI.GridPageChangedEventArgs.ExecuteCommand(Object source) at Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) at Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

*******Exception*******

Message: Specified argument was out of the range of valid values. Parameter name: value
Source: Telerik.Web.UI
Target Site: Void set_CurrentPageIndex(Int32)
Stack trace: at Telerik.Web.UI.GridTableView.set_CurrentPageIndex(Int32 value) at Telerik.Web.UI.GridPageChangedEventArgs.ExecuteCommand(Object source)

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 09 Apr 2009, 12:18 PM
Hi Jomey,

Based on this information, it is hard to determine what is causing the unwanted behavior.
One thing you may consider, however, is using a standard filtering template, to customize the filtering of the control, without having to come up with a custom column.

All the best,
Yavor
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Jomey
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or