Is there a way to use the RadAjaxManager and the RadToolTipManager together?
I want to use ajax for inserting and editing the appointments in the scheduler (http://demos.telerik.com/aspnet-ajax/scheduler/examples/outlook2007/defaultcs.aspx)
and the tooltip to show the appointment details (http://demos.telerik.com/aspnet-ajax/scheduler/examples/radtooltip/defaultcs.aspx).
I have both examples up an running. But as far as i try to implement both features, the tooltip doesn't come up.
When i remove the RadAjaxManager the tooltips works fine.
| ..... |
| <div> |
| <script type="text/javascript"> |
| //<![CDATA[ |
| function hideActiveToolTip() { |
| var tooltip = Telerik.Web.UI.RadToolTip.getCurrent(); |
| if (tooltip) { |
| tooltip.hide(); |
| } |
| } |
| Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequestHandler); |
| function beginRequestHandler(sender, args) { |
| var prm = Sys.WebForms.PageRequestManager.getInstance(); |
| if (args.get_postBackElement().id.indexOf('RadScheduler1') != -1) { |
| hideActiveToolTip(); |
| } |
| } |
| function clientBeforeShow(sender, eventArgs) { |
| w = $telerik.$(window).width() / 2; |
| h = $telerik.$(window).height() / 2; |
| if ((sender._mouseX > w) && (sender._mouseY > h)) { |
| sender.set_position(Telerik.Web.UI.ToolTipPosition.TopLeft); |
| return; |
| } |
| if ((sender._mouseX < w) && (sender._mouseY > h)) { |
| sender.set_position(Telerik.Web.UI.ToolTipPosition.TopRight); |
| return; |
| } |
| if ((sender._mouseX > w) && (sender._mouseY < h)) { |
| sender.set_position(Telerik.Web.UI.ToolTipPosition.BottomLeft); |
| return; |
| } |
| sender.set_position(Telerik.Web.UI.ToolTipPosition.BottomRight); |
| } |
| //]]> |
| </script> |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"> |
| <ajaxsettings> |
| <telerik:AjaxSetting AjaxControlID="Panel1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </ajaxsettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" Skin="Office2007" /> |
| <asp:Panel ID="Panel1" runat="server"> |
| <telerik:RadScheduler ID="RadScheduler1" runat="server" Culture="German (Germany)" |
| DataEndField="End" DataKeyField="ID" DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID" |
| DataSourceID="ObjectDataSourceAppointments" DataStartField="Start" DataSubjectField="Subject" |
| HoursPanelTimeFormat="Htt" ShowFooter="False" Skin="Office2007" StartInFullTime="True" |
| StartInsertingInAdvancedForm="True" ValidationGroup="RadScheduler1" SelectedView="MonthView" |
| ShowFullTime="True" CustomAttributeNames="Inhaber" EnableCustomAttributeEditing="True" |
| TimeZoneOffset="01:00:00" WorkDayEndTime="20:00:00" WorkDayStartTime="07:00:00" |
| Width="900px" FirstDayOfWeek="Monday" LastDayOfWeek="Sunday" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" |
| OnAppointmentCreated="RadScheduler1_AppointmentCreated" OnDataBound="RadScheduler1_DataBound"> |
| <multidayview userselectable="false" /> |
| <timelineview userselectable="false" /> |
| <resourcetypes> |
| <telerik:ResourceType DataSourceID="ObjectDataSourceSegments" ForeignKeyField="SegmentID" |
| KeyField="ID" Name="Segment" TextField="SegmentName" /> |
| <telerik:ResourceType DataSourceID="ObjectDataSourceMedientyp" ForeignKeyField="MedientypID" |
| KeyField="ID" Name="Medientyp" TextField="MedientypName" /> |
| </resourcetypes> |
| <localization advancedalldayevent="All day"></localization> |
| <advancedform dateformat="dd.MM.yyyy" timeformat="HH:mm" enablecustomattributeediting="True" |
| modal="True"></advancedform> |
| </telerik:RadScheduler> |
| </asp:Panel> |
| <asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional"> |
| <ContentTemplate> |
| <telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Width="320" Height="210" |
| Animation="None" HideEvent="LeaveToolTip" Text="Loading..." RelativeTo="Element" |
| OnAjaxUpdate="RadToolTipManager1_AjaxUpdate" OnClientBeforeShow="clientBeforeShow" |
| Skin="Office2007" AutoTooltipify="false" /> |
| </ContentTemplate> |
| </asp:UpdatePanel> |
| ... |
| </div> |
| ... |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| RadScheduler1.AppointmentCreated += RadScheduler1_AppointmentCreated; |
| RadScheduler1.DataBound += RadScheduler1_DataBound; |
| } |
| protected void RadScheduler1_AppointmentCreated(object sender, AppointmentCreatedEventArgs e) |
| { |
| string clientID = e.Appointment.ClientID; |
| RadToolTipManager1.TargetControls.Add(clientID, e.Appointment.ID.ToString(), true); |
| } |
| protected void RadToolTipManager1_AjaxUpdate(object sender, ToolTipUpdateEventArgs e) |
| { |
| int aptId; |
| Appointment apt; |
| if (!int.TryParse(e.Value, out aptId))//The appoitnment is occurrence and FindByID expects a string |
| apt = RadScheduler1.Appointments.FindByID(e.Value); |
| else //The appointment is not occurrence and FindByID expects an int |
| apt = RadScheduler1.Appointments.FindByID(aptId); |
| AppointmentToolTip toolTip = (AppointmentToolTip)LoadControl("~/controls/AppointmentToolTip.ascx"); |
| toolTip.TargetAppointment = apt; |
| e.UpdatePanel.ContentTemplateContainer.Controls.Add(toolTip); |
| } |
| protected void RadScheduler1_DataBound(object sender, EventArgs e) |
| { |
| RadToolTipManager1.TargetControls.Clear(); |
| ScriptManager.RegisterStartupScript(this, typeof(Page), "HideToolTip", "hideActiveToolTip();", true); |
| } |
| } |
| } |
Hello,
I try to use telerik tree view in trial before bying it. All requirements are completed except one - customizing a loading status.
I use following code:
<asp:ScriptManagerProxy runat="server">
<Scripts>
<asp:ScriptReference Path="../Scripts/TreeView/Core.js" />
<asp:ScriptReference Path="../Scripts/TreeView/jQueryPlugins.js" />
<asp:ScriptReference Path="../Scripts/TreeView/AnimationScripts.js" />
<asp:ScriptReference Path="../Scripts/TreeView/NavigationScripts.js" />
<asp:ScriptReference Path="../Scripts/TreeView/RadTreeViewScripts.js" />
...
</Scripts>
</asp:ScriptManagerProxy>
<telerik:RadTreeView
ID="_dimensionTree"
runat="server"
MultipleSelect="true"
EnableEmbeddedScripts="false"
PersistLoadOnDemandNodes="false"
EnableViewState="false">
<LoadingStatusTemplate>
<asp:Image runat="server" ID="_loadingImage" ImageUrl="~/_Common/Controls/DimensionFilter/Images/Paging/smallestprog.gif" ToolTip="Loading..." Width="15px" Height="15px" />
</LoadingStatusTemplate>
<WebServiceSettings Path="../Services/TreeViewDataProvider.asmx" Method="GetTreeViewLevel"/>
</telerik:RadTreeView>
I expect to see my custom loading indicator, but tree renders defaut.
Also I tried to use an example from here, but it still renders the default loading image.
So, I want to ask, Is this limits of trial version or I do something wrong?
Thanks, Alexander
<
telerik:RadToolTip runat="server" SkinId="WizardTips" Animation="Slide" RelativeTo="Element" Width="200px" HideEvent="FromCode" Position="MiddleRight" AutoCloseDelay="0" AnimationDuration="300" ShowDelay="300" HideDelay="300" ShowEvent="OnFocus" EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false" Skin="MySkin" ></telerik:RadToolTip>
As requested the tooltip appears on the right of my text input boxes but of course when the browser size doesn't support display on the right, the tooltip appears to the left of my input boxes. I appreciate that this is clever but I'd really rather it didn't do this and instead just always displayed on the right even if that means you can't read all the tooltip. Is there a way of doing that?
Thanks in advance.