Print Page | Close Window

EntityQueryPagedCollectionView.PageIndex==-1, why ?

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2374
Printed Date: 25-Mar-2025 at 12:29pm


Topic: EntityQueryPagedCollectionView.PageIndex==-1, why ?
Posted By: jocker1331
Subject: EntityQueryPagedCollectionView.PageIndex==-1, why ?
Date Posted: 14-Dec-2010 at 10:40am
By design EntityQueryPagedCollectionView.PageIndex  may be set to -1 (for example when objectDataSource.Load() called twice), but DataPager from SL toolkit wont only >=0 numbers (raise ArgumentOurOfRangeException).

private void InitFields()
{
    this._queryPageMap.Clear();
    this._requestedPageLoading.Clear();
    this.CurrentItem = null;
    this.CurrentPosition = -1;
    this.PageIndex = -1;  //!!!
}


Is it bug or design feature ?



Replies:
Posted By: kimj
Date Posted: 15-Dec-2010 at 11:40am
Are you seeing an ArgumentOutOfRangeException or just curious about the setting?  We have not seen an exception in our testing.  When the control is initialized it does set the PageIndex to -1; it will be reset to 0 when the page load logic is entered.


Posted By: jocker1331
Date Posted: 18-Dec-2010 at 3:00am
uploads/1024/DevForceSample.rar - uploads/1024/DevForceSample.rar

ok, see attached example.... just wait while first data part loaded and click Reload button.



Print Page | Close Window