New Posts New Posts RSS Feed: EntityQueryPagedCollectionView.PageIndex==-1, why ?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

EntityQueryPagedCollectionView.PageIndex==-1, why ?

 Post Reply Post Reply
Author
jocker1331 View Drop Down
Newbie
Newbie


Joined: 11-Dec-2010
Posts: 5
Post Options Post Options   Quote jocker1331 Quote  Post ReplyReply Direct Link To This Post Topic: EntityQueryPagedCollectionView.PageIndex==-1, why ?
    Posted: 18-Dec-2010 at 3:00am
uploads/1024/DevForceSample.rar

ok, see attached example.... just wait while first data part loaded and click Reload button.
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
jocker1331 View Drop Down
Newbie
Newbie


Joined: 11-Dec-2010
Posts: 5
Post Options Post Options   Quote jocker1331 Quote  Post ReplyReply Direct Link To This Post 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 ?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down