I am using a radgrid having a child grid (DetailTable1) which again has one more child grid (DetailTable2) whenever I drag the column of the detailTable2 to groupby header I get the following javascript error on IE7:-
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)
Timestamp: Fri, 13 May 2011 22:55:24 UTC
Message: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500
Line: 6
Char: 62099
Code: 0
URI: http://192.168.9.99/106/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_AccountingRadScriptManager_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3afab31106-1bd6-4491-9a14-59e0fc4a7081%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2011.1.315.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3ae4ca4719-c559-4761-8501-9be20bbda1fe%3a16e4e7cd%3aed16cbdc%3a86526ba7%3af7645509%3a24ee1bba%3a11a04f7e%3af46195d3%3ae330518b%3a1e771326%3ac8618e41%3a874f8ea2%3ab7778d6c%3a19620875%3a490a9d4e%3abd8f85e4%3a58366029
This error only occurs on IE7 and not on mozilla and any other browser. Please help in this .
Thanks,
Rahul.
9 Answers, 1 is accepted
The reasons for this error may vary. That is why I suggest you perform some troubleshooting using the tips from the following resources:
Web Resources Troubleshooting
Web Resources demystified: Part 3 (Troubleshooting)
Please let us know what your findings are.
Greetings,
Mira
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
I did the same steps by adding
<add path="ScriptResource.axd" verb="GET,HEAD"
type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
validate="false"/> in my web.config file and added
<handlers>
<add name="Telerik.Web.UI.WebResource"
path="Telerik.Web.UI.WebResource.axd" verb="*"
type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.1.619.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>
<handlers> section instead of <httpHandlers>. But it still gives some errorful results.
Can you please help me out in finding some errorless results.?
Thanks in advance.
Could you please be more precise about the errors you get after performing the troubleshooting from the following resources:
Web Resources Troubleshooting
Web Resources demystified: Part 3 (Troubleshooting)
I am looking forward to your reply.
Kind regards,
Mira
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Thanks for your response.
After performing all the steps of adding handlers and httphandlers as guided in troubleshoot, i still get some "Sys.Webforms.PageRequestManagerServerErrorException" error.
This error occurs with some specific records after dragging them into group panel. Why this error occurs only with specific records could not be discovered but it happens in IE only. With Firefox i don't get any error but i cannot sort records after dropping them to group panel.
Please reply asap..
Thanks in advance.
Have you ajaxified your page? The cause of the issue might be a server error masked by the RadAjax.
Please try temporarily disabling the AJAX (EnableAJAX="false") and let me know what the error message is.
I am looking forward to your reply.
Best wishes,
Mira
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
Thanks for the response.
I tried disabling Ajax on my rad grid temporarily(as suggested) but it didn't help me as well. The error is same what i got previously. Please help asap. Thanks again in advance.
Based on the supplied information, it is hard to determine what is causing the error.
Please open a formal support ticket and send us a small working project, demonstrating your full setup and showing the unwanted behavior.
We will debug it locally and get back to you.
Thank you in advance for the cooperation.
All the best,
Mira
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
thanks for getting back to us.
Below is a sample code as required for debugging.
Demo.aspx
<%@ Page Title="Demo For Drag" Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
<asp:Content ID="DemoContent" ContentPlaceHolderID="ContentPlaceHolder_Content"
runat="Server">
<telerik:RadCodeBlock ID="JavaScriptRadCodeBlock" runat="server">
<script language="javascript" type="text/javascript">
function RefreshDemoRadGrid() {
try {
var radMgr = $find('<%=RadAjaxManager.GetCurrent(Page).ClientID %>');
radMgr.ajaxRequest("DemoRadGrid");
return false;
}
catch (er) { }
}
</script>
</telerik:RadCodeBlock>
<telerik:RadSplitter ID="MainRadSplitter" runat="server">
<telerik:RadPane ID="DemoTopRadPane" runat="server" SkinID="TopRadPane">
<table cellpadding="0" cellspacing="0">
<tr>
<td style="padding-top: 10px">
<asp:Label ID="BillingDemo1Label" Text="Demo Test" runat="server"></asp:Label>
</td>
</tr>
</table>
</telerik:RadPane>
<telerik:RadSplitBar ID="DefaultRadSplitBar" runat="server">
</telerik:RadSplitBar>
<telerik:RadPane ID="DemoBottomRadPane" runat="server" >
<asp:Label ID="MessageLabel" runat="server" Visible="false"></asp:Label>
<div >
<telerik:RadGrid ID="DemoRadGrid" runat="server" EnableViewState="true"
ShowGroupPanel="true" OnDataBound="DemoRadGrid_DataBound" OnItemCreated="DemoRadGrid_ItemCreated"
OnNeedDataSource="DemoRadGrid_NeedDataSource" OnDetailTableDataBind="Demo_DetailTableDataBind">
<ClientSettings>
<Selecting AllowRowSelect="true" />
</ClientSettings>
<MasterTableView DataKeyNames="Demo2ID,Demo3,Demo4" AutoGenerateColumns="false"
Width="100%" HierarchyDefaultExpanded="false" CommandItemDisplay="Top" HierarchyLoadMode="ServerOnDemand"
DataMember="Demo4DetailTable" Name="Demo4TableView">
<CommandItemTemplate>
<table width="100%">
<tr>
<td>
<asp:Label ID="Demo4Label" runat="server" Text="Demo4s" SkinID="FieldLabel"></asp:Label>
</td>
<td>
<asp:LinkButton ID="Demo2ElementExpandCollapseLinkButton" runat="server" Text="Expand/Collapse Section"
OnClick="Demo2ElementExpandCollapseLinkButton_Click"></asp:LinkButton>
</td>
</tr>
</table>
</CommandItemTemplate>
<Columns>
<telerik:GridBoundColumn DataField="Demo4Ex" HeaderText="Demo4" UniqueName="Demo4Ex">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Demo5Desc" HeaderText="Demo5 Type" UniqueName="Demo5Type">
</telerik:GridBoundColumn>
</Columns>
<DetailTables>
<telerik:GridTableView Name="Demo6GridTableView" HierarchyLoadMode="Client"
AutoGenerateColumns="false" HierarchyDefaultExpanded="false" DataKeyNames="ChargeID,Demo4"
DataMember="Demo6DataTable" CommandItemDisplay="Top" Width="100%">
<Columns>
<telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Action" Groupable="false">
<ItemTemplate>
<asp:LinkButton ID="Demo6TableViewEditLinkButton" runat="server" Text="Edit"></asp:LinkButton>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="Demo6Desc" HeaderText="Demo6 Type" UniqueName="Demo6Desc">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="StatusOfCharge" HeaderText="Status" UniqueName="StatusOfCharge">
</telerik:GridBoundColumn>
</Columns>
<DetailTables>
<telerik:GridTableView Name="Demo7GridTableView" HierarchyLoadMode="Client"
HierarchyDefaultExpanded="false" DataKeyNames="Demo7ID,Demo4"
DataMember="Demo7DataTable" CommandItemDisplay="Top" Width="100%">
<Columns>
<telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Action" Groupable="false">
<ItemTemplate>
<asp:LinkButton ID="Demo7TableViewEditLinkButton" runat="server" Text="Edit"
SkinID="SmallLinkButton"></asp:LinkButton>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="PercentOfCharge" HeaderText="Percentage" UniqueName="PercentOfCharge">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Comment" HeaderText="Comment" UniqueName="Comment">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="IsObsolete" HeaderText="Status" UniqueName="IsObsolete">
</telerik:GridBoundColumn>
</Columns>
<DetailTables>
<telerik:GridTableView Name="Demo2ElementGridTableView" HierarchyLoadMode="Client"
AutoGenerateColumns="false" DataMember="Demo2ElementDataTable" HierarchyDefaultExpanded="false"
DataKeyNames="Demo8ID, Demo7ID, Position,Demo4" CommandItemDisplay="Top"
Width="100%">
<PagerStyle AlwaysVisible="true" />
<CommandItemTemplate>
<table>
<tr>
<td>
<asp:Label ID="ElementsLabel" runat="server" Text="Elements" SkinID="FieldLabel"></asp:Label>
</td>
</tr>
</table>
</CommandItemTemplate>
<Columns>
<telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Action" Groupable="false">
<ItemTemplate>
<asp:LinkButton ID="Demo2ElementTableViewEditLinkButton" runat="server" Text="Edit"
SkinID="SmallLinkButton">
</asp:LinkButton>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="Position" HeaderText="Position">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ElementTypeDesc" HeaderText="Element Type">
</telerik:GridBoundColumn>
</Columns>
</telerik:GridTableView>
</DetailTables>
</telerik:GridTableView>
</DetailTables>
</telerik:GridTableView>
</DetailTables>
</MasterTableView>
</telerik:RadGrid>
</div>
</telerik:RadPane>
</telerik:RadSplitter>
<telerik:RadWindowManager ID="DemoRadWindowManager" runat="server">
</telerik:RadWindowManager>
</asp:Content>
Demo.aspx.cs
protected void Page_Init(object sender, EventArgs e)
{
DemoRadGrid.MasterTableView.PageSize = 10;
}
protected void Page_Load(object sender, EventArgs e)
{
//code to add ajax settings to the grid and permission to view the page
}
protected void DemoRadGrid_ItemCreated(object sender, GridItemEventArgs e)
{
//code to find link buttons and enable them according to permission
}
protected void DemoRadGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
//code to get list of items from db for “ Demo4DetailTable”
DataTable Demo4DataTable = new DataTable("Demo4DetailTable");
Demo4DataTable.Columns.Add(new DataColumn("Demo2", System.Type.GetType("System.Int32")));
Demo4DataTable.Columns.Add(new DataColumn("Demo4Ex", System.Type.GetType("System.String")));
Demo4DataTable.Columns.Add(new DataColumn("Demo5Desc", System.Type.GetType("System.String")));
Demo4DataTable.Columns.Add(new DataColumn("Demo3", System.Type.GetType("System.Int32")));
Demo4DataTable.Columns.Add(new DataColumn("Demo4", System.Type.GetType("System.String")));
foreach (//code to fetch record from list)
{
//code to fill values into corresponding columns
}
DemoRadGrid.DataSource = Demo4DataTable;
DemoRadGrid.DataMember = "Demo4DetailTable";
}
protected void Demo6AndElement_DetailTableDataBind(object sender, GridDetailTableDataBindEventArgs e)
{
if (e.DetailTableView.Name.Equals("Demo6GridTableView"))
{
Int32 Demo2 = Convert.ToInt32(e.DetailTableView.ParentItem.GetDataKeyValue("Demo2"));
Int32 levelID = GetLevelID();
if (Demo2 != 0 && levelID != -1)
{
//code to fetch records from db for “Demo6DataTable”.
DataTable Demo6DataTable = new DataTable("Demo6DataTable");
Demo6DataTable.Columns.Add(new DataColumn("Demo2", System.Type.GetType("System.Int32")));
Demo6DataTable.Columns.Add(new DataColumn("ChargeID", System.Type.GetType("System.Int32")));
Demo6DataTable.Columns.Add(new DataColumn("Demo6Desc", System.Type.GetType("System.String")));
Demo6DataTable.Columns.Add(new DataColumn("StatusOfCharge", System.Type.GetType("System.String")));
Demo6DataTable.Columns.Add(new DataColumn("Demo4", System.Type.GetType("System.String")));
foreach (//code to fetch record from list)
{
//code to fill values into corresponding columns
}
e.DetailTableView.DataSource = Demo6DataTable;
e.DetailTableView.DataMember = "Demo6DataTable";
}
}
else if (e.DetailTableView.Name.Equals("Demo7GridTableView"))
{
Int32 chargeID = 0;
chargeID = Convert.ToInt32(e.DetailTableView.ParentItem.GetDataKeyValue("ChargeID"));
if (chargeID != 0)
{
//code to fetch records from db for “Demo7DataTable”
DataTable Demo7DataTable = new DataTable("Demo7DataTable");
Demo7DataTable.Columns.Add(new DataColumn("Demo7ID", System.Type.GetType("System.Int32")));
Demo7DataTable.Columns.Add(new DataColumn("PercentOfCharge", System.Type.GetType("System.Decimal")));
Demo7DataTable.Columns.Add(new DataColumn("Comment", System.Type.GetType("System.String")));
Demo7DataTable.Columns.Add(new DataColumn("IsObsolete", System.Type.GetType("System.String")));
Demo7DataTable.Columns.Add(new DataColumn("Demo4", System.Type.GetType("System.String")));
foreach (//code to fetch record from list)
{
//code to fill values into corresponding columns
}
e.DetailTableView.DataSource = Demo7DataTable;
e.DetailTableView.DataMember = "Demo7DataTable";
}
}
else if (e.DetailTableView.Name.Equals("Demo2ElementGridTableView"))
{
Int32 Demo7ID = 0;
Int32.TryParse(e.DetailTableView.ParentItem.GetDataKeyValue("Demo7ID").ToString(), out Demo7ID);
DataTable demo2ElementDataTable = null;
if (Demo7ID != 0)
{
//code to fetch records from db for “ Demo2ElementGridTableView”
demo2ElementDataTable = new DataTable("Demo2ElementGridTableView");
demo2ElementDataTable.Columns.Add(new DataColumn("Demo7ID", System.Type.GetType("System.Int32")));
demo2ElementDataTable.Columns.Add(new DataColumn("Demo8ID", System.Type.GetType("System.Int32")));
demo2ElementDataTable.Columns.Add(new DataColumn("ActiveElementID", System.Type.GetType("System.Int32")));
demo2ElementDataTable.Columns.Add(new DataColumn("Position", System.Type.GetType("System.Int32")));
demo2ElementDataTable.Columns.Add(new DataColumn("ElementTypeDesc", System.Type.GetType("System.String")));
demo2ElementDataTable.Columns.Add(new DataColumn("Demo4", System.Type.GetType("System.String")));
foreach (//code to fetch record from list)
{
//code to fill values into corresponding columns
}
}
e.DetailTableView.DataSource = demo2ElementDataTable;
e.DetailTableView.DataMember = "demo2ElementDataTable";
}
protected void Demo2ElementExpandCollapseLinkButton_Click(object sender, EventArgs e)
{
Boolean isExpanded = false;
foreach (GridDataItem gridDataItem in DemoRadGrid.MasterTableView.Items)
{
if (gridDataItem.Expanded)
{
isExpanded = true;
break;
}
}
foreach (GridDataItem gridDataItem in DemoRadGrid.MasterTableView.Items)
gridDataItem.Expanded = !isExpanded;
}
protected void DemoRadGrid_DataBound(object sender, EventArgs e)
{
ResetItemExpandedState();
}
private void ResetItemExpandedState()
{
Int32 Demo2 = 0;
Int32 chargeID = 0;
Int32 Demo7ID = 0;
foreach (GridDataItem gridDataItem in DemoRadGrid.MasterTableView.Items)
{
if (gridDataItem.GetDataKeyValue("Demo2") != null)
Int32.TryParse(gridDataItem.GetDataKeyValue("Demo2").ToString(), out Demo2);
if (Demo2 != 0 && _expandedDemo2List.Contains(Demo2))
gridDataItem.Expanded = true;
GridTableView gridTableView = gridDataItem.ChildItem.NestedTableViews[0] as GridTableView;
if (gridTableView != null)
{
foreach (GridDataItem tableViewGridDataItem in gridTableView.Items)
{
if (tableViewGridDataItem.GetDataKeyValue("ChargeID") != null)
Int32.TryParse(tableViewGridDataItem.GetDataKeyValue("ChargeID").ToString(), out chargeID);
if (chargeID != 0 && _expandedChargeIDList.Contains(chargeID))
tableViewGridDataItem.Expanded = true;
GridTableView percentGridTableView = tableViewGridDataItem.ChildItem.NestedTableViews[0] as GridTableView;
if (percentGridTableView != null)
{
foreach (GridDataItem tablePercentViewGridDataItem in percentGridTableView.Items)
{
if (tablePercentViewGridDataItem.GetDataKeyValue("Demo7ID") != null)
Int32.TryParse(tablePercentViewGridDataItem.GetDataKeyValue("Demo7ID").ToString(), out Demo7ID);
if (Demo7ID != 0 && _expandedDemo7IDList.Contains(Demo7ID))
tablePercentViewGridDataItem.Expanded = true;
}
}
}
}
}
}
Thanks in advance..I looked through your code and I cannot see an obvious reason for the described issue.
Please open a formal support ticket and send us a small working project, demonstrating your full setup and showing the unwanted behavior. You can follow this blog post in order to isolate the problem.
We will debug the sample and get back to you with our findings.
Thank you in advance for the cooperation.
Greetings,
Mira
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>