So I have a RadPanelBar, and within that a RadTreeView. On a node click event I want so update some control.. for now I am just trying to update a textbox. It works fine except that the first time I click on a child node it takes a very long time to update the control.. Just a simple text change. I set a break point in my function and I noticed that it is taking long to fire the OnNodeClick event.. If I click a parent node in the tree view it loads fine on the first click. Also, after the first time I've clicked it.. it loads quickly.. If I refresh the page, it is slow on the first click again.. Is there something I am missing.. Is the structure of my HTML inappropriate for these AJAX calls? I feel like this is a really simple example that should work..
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="IncidentReportPanel">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="IRViewPanel" LoadingPanelID="LoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManagerProxy>
<telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" Style="width: 320px;
padding-top: 125px;" Skin="Vista">
</telerik:RadAjaxLoadingPanel>
<table width="100%">
<tr style="height: 25px">
<td>
</td>
<td>
</td>
</tr>
<tr style="height: 100%">
<td style="width: 250px">
<telerik:RadPanelBar ID="IncidentReportPanel" runat="server" Height="450px" CssClass="IRPanel">
<Items>
<telerik:RadPanelItem runat="server" Text="Incident Reports" ImageUrl="./Images/folder.gif"
Value="IncidentReports">
<Items>
<telerik:RadPanelItem>
<ItemTemplate>
<telerik:RadTreeView ID="IncidentReportsTreeView" runat="server" OnNodeExpand="LoadTreeNodes"
OnNodeClick="PopulateIRData">
<Nodes>
<telerik:RadTreeNode Text="Pending" ExpandMode="ServerSideCallBack" ImageUrl="./Images/completed.gif">
</telerik:RadTreeNode>
<telerik:RadTreeNode Text="Completed" ExpandMode="ServerSideCallBack" ImageUrl="./Images/completed.gif">
</telerik:RadTreeNode>
</Nodes>
</telerik:RadTreeView>
</ItemTemplate>
</telerik:RadPanelItem>
</Items>
</telerik:RadPanelItem>
<telerik:RadPanelItem runat="server" Text="Calendar" ImageUrl="./Images/calendar.gif"
Value="Calendar">
<Items>
<telerik:RadPanelItem>
<ItemTemplate>
<telerik:RadCalendar runat="server" ID="IRCalendar" Width="100%" />
</ItemTemplate>
</telerik:RadPanelItem>
</Items>
</telerik:RadPanelItem>
</Items>
</telerik:RadPanelBar>
</td>
<td>
<asp:Panel ID="IRViewPanel" runat="server">
<telerik:RadTextBox ID="RadText" runat="server">
</telerik:RadTextBox>
</asp:Panel>
</td>
</tr>
</table>
protected void PopulateIRData(object sender, RadTreeNodeEventArgs e)
{
RadText.Text = "Hello, World!";
}
Do While dr.Read() Dim d As New DateTime() Dim s As String = "" Dim NewDay As New RadCalendarDay(RadCalendar1) '---------------------------------Date If Not IsDBNull(dr("evnDate")) Then d = dr("evnDate") Else d = System.DateTime.Now End If NewDay.Date = New DateTime(d.Year, d.Month, d.Day) '---------------------------------Repeat If Not IsDBNull(dr("evnRepeats")) Then s = dr("evnRepeats") End If Select Case s Case "Monthly" NewDay.Repeatable = RecurringEvents.DayAndMonth Case "Daily" NewDay.Repeatable = RecurringEvents.DayInMonth Case "Weekly" NewDay.Repeatable = RecurringEvents.Week Case "" NewDay.Repeatable = RecurringEvents.None End Select '-------------------------------------Tooltip If Not IsDBNull(dr("evnToolTip")) Then NewDay.ToolTip = dr("evnToolTip") End If '-------------------------------------TemplateID, but first Create TEmplate, ' in order to create template create div 'Dim newT As New DayTemplate() 'newT.Controls.Add(cDiv) 'newT.ID = cDiv.InnerHtml.Replace(" ", "") 'If RadCalendar1.CalendarDayTemplates.Contains(newT) Then ' RadCalendar1.CalendarDayTemplates.Add(newT) 'End If 'NewDay.TemplateID = newT.ID 'RadCalendar1.SpecialDays.Add(NewDay) Dim cDiv As New System.Web.UI.HtmlControls.HtmlGenericControl("DIV") cDiv.Attributes("class") = "rcTemplate rcDayMortgage" If Not IsDBNull(dr("evnTemplateID")) Then cDiv.InnerHtml = dr("evnTemplateID") ElseIf dr("evnTemplateID") = "" Then cDiv.InnerHtml = "Calendar Entry" Else cDiv.InnerHtml = "Calendar Entry" End If cDiv.ID = cDiv.InnerText Dim template As New CalendarCellContentTemplate(RadCalendar1, d, cDiv, NewDay.Repeatable)Public Class CalendarCellContentTemplate Implements ITemplate Private cellContent As Control Public Sub New(ByVal calendarInstance As RadCalendar, ByVal cellDate As DateTime, ByVal cellContent As Control, _ ByVal repeat As Telerik.Web.UI.Calendar.RecurringEvents) Dim spec As RadCalendarDay Me.cellContent = cellContent spec = calendarInstance.SpecialDays(calendarInstance.SpecialDays.IndexOf(cellDate)) If spec Is Nothing Then spec = New RadCalendarDay() spec.Date = cellDate spec.TemplateID = "BirthdayTemplate" calendarInstance.SpecialDays.Add(spec) End If Dim template As New DayTemplate template.ID = cellContent.ID template.Content = Me spec.Repeatable = repeat calendarInstance.CalendarDayTemplates.Add(template) End Sub Public Sub InstantiateIn(ByVal container As System.Web.UI.Control) Implements System.Web.UI.ITemplate.InstantiateIn container.Controls.Add(Me.cellContent) End Sub End Class
<handlers> <remove name="WebServiceHandlerFactory-Integrated"/> <remove name="ScriptHandlerFactory"/> <remove name="ScriptHandlerFactoryAppServices"/> <remove name="ScriptResource"/><remove name="UrlRoutingHandler"/> <add name="HtmlPages" path="*.html" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness32"/> <add name="Exececute Xml Package" preCondition="integratedMode" path="execpackage.aspx" verb="*" type="ExecXmlPackage"/> <add name="Chart Image Handler" path="ChartImage.axd" verb="*" preCondition="integratedMode" type="Telerik.Web.UI.ChartHttpHandler"/> <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*"/> <add name="Telerik.ReportViewer.axd_*" path="Telerik.ReportViewer.axd" verb="*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=4.2.10.1110, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" preCondition="integratedMode"/> <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource,Culture=neutral, PublicKeyToken=a9d7983dfcc261be"/> <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add name="UrlRoutingHandler" verb="*" path="UrlRouting.axd" preCondition="integratedMode" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/></handlers>Colleagues,
Who knows if it is possible to add a horizontal line showing the actual time to the RadScheduler for ASP.NET? It must move from top to bottom, as time passes, similar to what we can see in the Outlook’s calendar?
Regards,
- Stepan.