Hi Prava,
The reason you're getting an exception is because the SelectionChange event also fires when an item is
deselected. A deselection of the first item occurs when you tap the 2nd item.
So your code:
object cc = e.NewItems[0], will cause an exception because there is nothing in NewItems when the first item is deselelected before the second item becomes selected.
The proper way to handle this would be to either check e.NewItems for items before requesting an item at an index. As an example, this will work for your needs:
Note: You can also catch items that were deselected by inspecting e.OldItems in the event handler.
Please let us know if you have any further trouble.
Regards,
Lance | Tech Support Engineer, Sr.
Telerik by Progress
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items