Hi,
I got this error:
Micorosfot JScript runtime error:
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. the status code returned from the server was:12030
I have a RadTreeView in a RadPanelBar in aspx file
<rad:RadPanelItem Text="Property" ImageUrl="Img/mail.gif" Expanded="False" Width="100%" >
<Items>
<rad:RadPanelItem>
<ItemTemplate>
<telerik:RadTreeView ID="tree_bound" runat="server" TabIndex="1" Visible="true" OnNodeClick="RadTreeView1_NodeClick" OnClientNodeClicked="tree_bound_OnClientNodeClicked" ForeColor="Blue" >
<WebServiceSettings Path="Bound.asmx" Method="GetTreeViewBound" />
<Nodes>
<telerik:RadTreeNode Text="Hong Kong SAR" Value="A375CD32-1EEB-44AB-B7FF-202C267AA095" ExpandMode="WebService" ForeColor="Blue">
</telerik:RadTreeNode>
<telerik:RadTreeNode Text="Macau" Value="F1FD132C-5227-4E18-A698-EAE4C10A099D" ExpandMode="WebService" ForeColor="Blue">
</telerik:RadTreeNode>
</Nodes>
</telerik:RadTreeView>
</ItemTemplate>
</rad:RadPanelItem>
</Items>
</rad:RadPanelItem>
in cs file:
private void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
if (dataSource != null)
{
if (current_bound_id == previous_bound_id)
{
RadGrid1.DataSource = dataSource;
}
else
{
Property p = new Property();
dataSource = p.GetPropertyByBoundId(current_bound_id);
Session["itemsCount"] = dataSource.Rows.Count;
RadGrid1.DataSource = dataSource;
}
}
else
{
labelMessage.Text = "<div style='color:red;'>Your session has expired. Please reload the page.</div>";
}
}
protected void RadTreeView1_NodeClick(object sender, RadTreeNodeEventArgs e)
{
this.previous_bound_id = this.current_bound_id;
this.current_bound_id = e.Node.Value;
this.RadGrid1.DataSource = null;
this.RadGrid1.Rebind();
}
OnceI clicked a large record item in the tree, the grid can bind the data but will generate the above error after click another items, is it related to the cache or ISA Proxy problems?
Please help.
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Telerik.WebControls;
using ClickTactics.Data.ObjectMapping;
using System.Data;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//if (!IsPostBack)
//{
// DefineGridStructure();
//}
}
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
//if you allow the id of the header buttons to be autgenerated
//for some reason they change on postback after sorting which then
//fires an error after the 2nd attempt to sort...this is a workaround
if (e.Item is GridHeaderItem)
{
foreach (TableCell cell in e.Item.Cells)
{
foreach (Control ctrl in cell.Controls)
{
if (ctrl is LinkButton)
{
ctrl.ID = "btn" + (ctrl as LinkButton).ClientID;
}
}
}
}
}
protected void Page_Init(object sender, System.EventArgs e)
{
DefineGridStructure();
}
private void DefineGridStructure()
{
RadGrid grid = new RadGrid();
grid.ItemCreated += new GridItemEventHandler(RadGrid1_ItemCreated);
grid.NeedDataSource += new GridNeedDataSourceEventHandler(grid_NeedDataSource);
grid.ID = "RadGrid1";// +DateTime.Now.ToString();
grid.MasterTableView.ID = "RadGrid1MTView";
grid.Skin = "Inox";
grid.Width = Unit.Percentage(100);
grid.PageSize = 1;
grid.AllowPaging = true;
grid.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;
grid.AutoGenerateColumns = false;
grid.AllowSorting = true;
//Add Customers table
grid.MasterTableView.PageSize = 2;
grid.MasterTableView.Width = Unit.Percentage(100);
grid.MasterTableView.DataKeyNames = new string[] { "EmpID" };
GridBoundColumn boundColumn = new GridBoundColumn();
boundColumn.DataField = "EmpID";
boundColumn.HeaderText = "Emp ID";
grid.MasterTableView.Columns.Add(boundColumn);
boundColumn = new GridBoundColumn();
boundColumn.DataField = "EmpName";
boundColumn.HeaderText = "EmpName";
grid.MasterTableView.Columns.Add(boundColumn);
grid.DataSource = GetDataTable();
grid.DataBind();
//Add Orders table
// Add the grid to the placeholder
this.PlaceHolder1.Controls.Add(grid);
}
}
| private void RadAjaxManager1_ResolveUpdatedControls(object sender, UpdatedControlsEventArgs e) |
| { |
| foreach (Control ctl in GUIManagement.ResolveUpdateControls) |
| { |
| e.UpdatedControls.Add(new AjaxUpdatedControl(ctl.UniqueID,String.Empty)); |
| } |
| Control _postbackcontrol = Page.FindControl(e.PostBackControlID); |
| if (_postbackcontrol == null) |
| { |
| e.SuppressError = true; |
| } |
| GUIManagement.ResolveUpdateControls = new List<Control>(); |
| } |

|
|
