You must Sign In to post a response.
  • Category: Silverlight

    ArgumentOutOfRangeException in PagedCollectionView

    Hi,I am working on silverlight 4,
    for displaying data we are using datagrid, for
    this we are using PagedCollectionView for storing the collection,
    grid is displaying properly but our problem is
    when we want to cancel the details
    we are getting the error like
    ArgumentOutOfRangeException in PagedCollectionView

    TempDetails = new List<Patient>();
    PagedCollectionView=new PagedCollectionView(TempDetails);
  • #746875
    Hai Ramana,
    If you cna see your code here:

    TempDetails = new List<Patient>();
    PagedCollectionView=new PagedCollectionView(TempDetails);

    If you are having the new list of patient which will be empty then you can get the collection view.
    So first you need to fill the patient may be with at least one record which you are going to cancel.
    So your code should be look like:

    var TempDetails = new List<Patient>();
    Patient p = new Patient();
    p.PId = "someId";
    p.PName = "some name";
    .
    .
    .
    .
    TempDetails.Add(p);
    PagedCollectionView=new PagedCollectionView(TempDetails);

    Hope it will be helpful to you.

    Regards,
    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)
    pawansoftit@gmail.com

  • #746895
    Hi,

    Can you please post the complete function where the piece of code is used.

    There are couple suggestions in below articles:

    social.msdn.microsoft.com/Forums/silverlight/en-US/564655d8-537b-4127-9d71-9fd24515066d/datagrid-argumentoutofrangeexception-in-pagedcollectionviewgetitemat-holding-down-down-arrow-key?forum=silverlightcontrols

    connect.microsoft.com/VisualStudio/feedback/details/595364/argumentoutofrangeexception-in-pagecollectionview


    Regards,
    Asheej T K


  • Sign In to post your comments