Last Updated: 21 Mar 2014 10:49 by ADMIN
Created on: 19 Mar 2014 15:16
Category: DataPager
Type: Bug Report
wpf RadDataPager Default value -1 is causing exceptions when defining PageSize
Found with JustDecompile :
        public int PageIndex
                return (int)base.GetValue(RadDataPager.PageIndexProperty);
                base.SetValue(RadDataPager.PageIndexProperty, value);

When binding values to PageSize and PageIndex, the default value cause erratic exceptions... 

System.ArgumentOutOfRangeException: PageIndex cannot be negative when PageSize is positive.

I actually never set negative value, it seems to be caused by your default value...

I also get this sometimes :
PageIndex can only be set to -1 when the PageSize is 0

I don't see how 0 could be a valid value in this case, and I never set it to 0, Why would I want to put -1 as PageIndex? 0 would be the right default value IMHO.

How can I make it work?
1 comment
Posted on: 20 Mar 2014 14:48

Generally, this exception is thrown on purpose in the cases when pager is used but the PageSize is not specified. 
I tried to reproduce the problem using the provided details but to no avail. Please open a support ticket and send a sample project demonstrating the issue.