Is it neccessary to rebind the Telerik ListView whenever its SelectedIndexChangedEvent is fired ?

2 posts, 1 answers
  1. Harendra
    Harendra  avatar
    10 posts
    Member since:
    Jun 2013

    Posted 10 Oct 2013 Link to this post

    I have an unusual question regarding listview. I have used many controls like drop down , gridview etc but didn't find anything like to rebind the control whenever its selectedindexchanged event is fired?

    But today when i was working with the Listview of which i was firing its SelectedIndexChanged event on item selection, what i noticed that the event runs successfully for the first time and details of the item selected is shown but as soon as some other item is selected, the event throws an error on the code where it accepts the item value - as shown below

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

    Exception is thrown when : 

    ItemID = ItemListView.SelectedValue.ToString();

     I Though of rebinding it in the event itself and the problem went away.
    I am still confused that why i should rebind listview in the SelectedIndexChanged event.

    Thanks for reading and any usefull info will be appreciated ..!!
  2. Answer
    Kostadin avatar
    1733 posts

    Posted 15 Oct 2013 Link to this post

    Hello Harendra,

    A colleague of mine has already answered your other forum thread. I would ask you to continue your conversation with him there and close this one.

    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top