RadImageGallery throws out error: index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

4 posts, 0 answers
  1. Deena
    Deena avatar
    2 posts
    Member since:
    Jan 2017

    Posted 27 Jun Link to this post

    I have a repeater to list all products which contains pictures for each product

    if I click product A which has 3 pictures, clicked the last pic, it shows properly

    then I click product B which has 1 pictures, the page throws out error: index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index

    I believe the issue is on Proudct B, RadImageGallery still tries to show the third pic, and couldn't find it.

  2. Peter Milchev
    Admin
    Peter Milchev avatar
    300 posts

    Posted 30 Jun Link to this post

    Hello Deena,

    Would you please modify the attached project so that it represents better your implementation and replicates the issue and send it back to us in an official support ticket or paste here the necessary modifications that should be applied? To run the project you should include the Telerik.Web.UI.dll assembly in the Bin folder.

    Once we are able to replicate the issue, we would be able to provide you more specific suggestions. 

    Regards,
    Peter Milchev
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Deena
    Deena avatar
    2 posts
    Member since:
    Jan 2017

    Posted 30 Jun in reply to Peter Milchev Link to this post

    hi Peter

    thanks for reply, my project is so big.

    let me make the question simpler:

    when RadImageGallery loads, how I can make it show the first pic?

  4. Peter Milchev
    Admin
    Peter Milchev avatar
    300 posts

    Posted 05 Jul Link to this post

    Hello Deena,

    I am afraid that I was unable to completely understand what you mean with "show the first pic". 

    The first pic shows automatically, but you can choose a different starting picture by setting the CurrentItemIndex property. 

    What I would suggest you is to modify the project attached in my previous reply so that it replicates the issue and send it back to us in an official support thread. Thus, we would be able to investigate your exact scenario locally and help you more efficiently. 

    Once we have a closure in the support thread, we can share it here for convenience and better visibility from the community. 

    Regards,
    Peter Milchev
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top