I'm having some problems with one of our webshops. A Telerik radgrid works as the cart and lists all products currently in the cart. The paging on the Radgrid correctly splits the cart view into different pages. The problem occurs when one manually tries to change the amount of a product, but only if the product is on the LAST page of the radgrid and only if the number of products are less than the page size limit.
I have figured it out as much as the radgrid believes there are always an even amount of products, based on the radgrid's page size.
The crash occurs in the tbQuantity_TextChanged event handler, more specific when var shopItemID = Convert.ToInt32(item.GetDataKeyValue("ID")); is called for an item that doesn't exist on this page, but on another page.
The exception is
System.ArgumentOutOfRangeException was unhandled by user code
Message=Index was outof range. Must be non-negative and less than the size of the collection.
Parameter name: index
<%@ Control Language="C#"AutoEventWireup="true"CodeBehind="ShopItems.ascx.cs"Inherits="Litho.Framework.Web.Modules.Shop.ShopItems"%>
int recordID = (int)dataItem.GetDataKeyValue("OrderID");
Hope this helps.
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.