I am fairly new to C# .NET and very new to Telerik controls so please forgive me if this is trivial.
I am having trouble getting the paging element to work for a RadGrid control. Here is what I am doing: I read in a CVS file, parse it into a List<Dictionary<string,object>> and then add the data source to the RadGrid as such (omitting the code behind that creates the data).
Now, this works as far as when the page comes up I get the initial grid populated with data. However, when I try to perform any of the paging (i.e. select a page to go to, or click on next page) I get errors on the web page and the callbacks never happen. I have break points in every function and none of them ever get called. The error in the browser (script error) is:
Sys.WebForms.PageRequestManagerServerErrorException: The state information is invalid for this page and might be corrupted.
I have googled this error without being able to find a solution. I have been trying to follow the examples from the telerik site. Here is my ASPX page:
I am having trouble getting the paging element to work for a RadGrid control. Here is what I am doing: I read in a CVS file, parse it into a List<Dictionary<string,object>> and then add the data source to the RadGrid as such (omitting the code behind that creates the data).
var data = ReadInCSVData(csvData); |
var Idata = ConvertToIEnumerable(data); |
RadGrid1.DataSource = Idata.ToDataSource(); |
RadGrid1.DataBind(); |
Now, this works as far as when the page comes up I get the initial grid populated with data. However, when I try to perform any of the paging (i.e. select a page to go to, or click on next page) I get errors on the web page and the callbacks never happen. I have break points in every function and none of them ever get called. The error in the browser (script error) is:
Sys.WebForms.PageRequestManagerServerErrorException: The state information is invalid for this page and might be corrupted.
I have googled this error without being able to find a solution. I have been trying to follow the examples from the telerik site. Here is my ASPX page:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" |
Inherits="BAPTFileUpload._Default" EnableEventValidation="false" ValidateRequest="false"%> |
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/DTD/xhtml11.dtd"> |
<html xmlns="http://www.w3.org/1999/xhtml"> |
<head></head> |
<body> |
<form runat="server" id="mainForm" method="post"> |
<h2>Table below</h2> |
<br /> |
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" |
ondatabinding="Page_Load" /> |
<!-- content start --> |
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
<AjaxSettings> |
<telerik:AjaxSetting AjaxControlID="RadGrid1"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="RadGrid1" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
</AjaxSettings> |
</telerik:RadAjaxManager> |
<telerik:RadGrid ID="RadGrid1" OnSortCommand="RadGrid1_SortCommand" |
OnPageIndexChanged="RadGrid1_PageIndexChanged" Width="97%" AllowSorting="True" |
PageSize="15" AllowPaging="True" AllowMultiRowSelection="True" runat="server" |
Gridlines="None" |
onselectedindexchanged="RadGrid1_SelectedIndexChanged"> |
<MasterTableView Width="100%" Summary="RadGrid table" /> |
<PagerStyle Mode="NextPrevAndNumeric" /> |
</telerik:RadGrid> |
</form> |
</body> |
</html> |