I've run into (what seems to be) a fairly bad bug. I've got it down into a proof-of-concept page which follows below. On the page there's a RadGrid, a button and a RadTextBox. If you select a row and click the "Click Me" button, then the selected row's index should appear in the RadTextBox. Now virtual scroll paging is enabled, so scroll to the second page, select a row, and then click "Click Me". Here I get an exception. It appears that the RadGrid has somehow forgotten it has a row selected. Moreover, if I change the RadTextBox to a native ASP.NET TextBox the crash doesn't happen.
Any input would be appreciated.
Environment: Visual Studio 2005, ASP.NET 2.0 w/ MS AJAX extension, and Telerik.Web.UI.dll version 2009.1.609.20. (I know that there is a new version of Telerik.Web.UI.dll, but I dropped in the latest version and it didn't seem to help.)
Edit: Also this crash seems to be browser dependent. I've seen it in IE6, and on IE8 in compatibility mode. In "normal" IE8 and in Firefox the crash doesn't happen. I need it to work in IE6.
Any input would be appreciated.
Environment: Visual Studio 2005, ASP.NET 2.0 w/ MS AJAX extension, and Telerik.Web.UI.dll version 2009.1.609.20. (I know that there is a new version of Telerik.Web.UI.dll, but I dropped in the latest version and it didn't seem to help.)
Edit: Also this crash seems to be browser dependent. I've seen it in IE6, and on IE8 in compatibility mode. In "normal" IE8 and in Firefox the crash doesn't happen. I need it to work in IE6.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadGridTest.aspx.cs" Inherits="RxLink.WebForms.Testing.RadGridTest" %> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
<html xmlns="http://www.w3.org/1999/xhtml" > |
<head runat="server"> |
<title>Untitled Page</title> |
</head> |
<body> |
<form id="form1" runat="server"> |
<telerik:RadScriptManager ID="scriptManager" runat="server" /> |
<telerik:RadGrid ID="grid" runat="server" AllowPaging="true" PageSize="10" |
Width="200px" OnNeedDataSource="grid_NeedDataSource" PagerStyle-Visible="false"> |
<ClientSettings EnablePostBackOnRowClick="true"> |
<Selecting AllowRowSelect="true" /> |
<Scrolling AllowScroll="true" EnableVirtualScrollPaging="true" /> |
</ClientSettings> |
</telerik:RadGrid> |
<asp:Button ID="button" runat="server" Text="Click Me" OnClick="button_Click" /> |
<telerik:RadTextBox ID="radTextBox" runat="server" /> |
</form> |
</body> |
</html> |
using System; |
using System.Collections.Generic; |
namespace RxLink.WebForms.Testing |
{ |
public partial class RadGridTest : System.Web.UI.Page |
{ |
protected void button_Click(object sender, EventArgs e) |
{ |
radTextBox.Text = Convert.ToString(grid.SelectedIndexes[0]); |
} |
protected void grid_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) |
{ |
grid.DataSource = GetRange(); |
} |
static IEnumerable<int> GetRange() |
{ |
for (int i = 0; i <= 50; i++) |
{ |
yield return i; |
} |
} |
} |
} |