I have a RadGrid with two GridTemplateColumns.
i need to tooltipsify the GridTemplateColumns, so i have taken two RadTooltipManager controls on the page
i have written the following code in Grids ItemDataBound event. (Here btnbooking and btnReference are button controls in first and second Gridtemplatecolumn ) OnAjaxUpdate methods for RadToolTipManager's are OnAjaxUpdateBooking and OnAjaxUpdateReference.
in these methods i am loading Booking.ascx and Reference.ascx usercontrols.
these two usercontrols contains "Close" button, on click of these buttons i need to hide the Tooltip.
when i click the close button i am getting the following error.
Sys.WebForms.PageRequestManagerServerErrorException: Invalid JSON primitive:
please find the code in ItemDataBound event, OnAjaxUpdate and Javascript method for hiding tooltip
please anyone help me where i am doing wrong.
Jai
i need to tooltipsify the GridTemplateColumns, so i have taken two RadTooltipManager controls on the page
i have written the following code in Grids ItemDataBound event. (Here btnbooking and btnReference are button controls in first and second Gridtemplatecolumn ) OnAjaxUpdate methods for RadToolTipManager's are OnAjaxUpdateBooking and OnAjaxUpdateReference.
in these methods i am loading Booking.ascx and Reference.ascx usercontrols.
these two usercontrols contains "Close" button, on click of these buttons i need to hide the Tooltip.
when i click the close button i am getting the following error.
Sys.WebForms.PageRequestManagerServerErrorException: Invalid JSON primitive:
please find the code in ItemDataBound event, OnAjaxUpdate and Javascript method for hiding tooltip
-- ItemDataBound Event
ToolTipManager1.TargetControls.Add(btnbooking.ClientID, btnbooking.Text, true);ToolTipManager2.TargetControls.Add(btnReference.ClientID, btnReference.Text, true); -- OnAjaxUpdate methods
protected void OnAjaxUpdateBooking(object sender, ToolTipUpdateEventArgs args) { Control ctrl = Page.LoadControl("~/ControlLibrary/Booking.ascx"); args.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl); AppWeb.ControlLibrary.BookingDetails booking = (AppWeb.ControlLibrary.BookingDetails)ctrl; WTButton btnClose = (WTButton)ctrl.FindControl("btnclose"); if (btnClose != null) btnClose.OnClientClicked = "CloseTooltipManager"; } protected void OnAjaxUpdateReference(object sender, ToolTipUpdateEventArgs args) { Control ctrl = Page.LoadControl("~/ControlLibrary/Reference.ascx"); args.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl); AppWeb.ControlLibrary.DualDetails dual = (AppWeb.ControlLibrary.DualDetails)ctrl; dual.PageType = ApptType.EXPORT_DROPOFF; dual.lGateApptAssoc_Id = Convert.ToInt64(args.Value); WTButton btnClose = (WTButton)ctrl.FindControl("btnclose"); if (btnClose != null) btnClose.OnClientClicked = "CloseTooltipManager"; }-- Javascript methodfunction CloseTooltipManager(sender, args) { var controller = Telerik.Web.UI.RadToolTipController.getInstance(); var tooltip = controller.get_activeToolTip(); if (tooltip) { tooltip.hide(); } }please anyone help me where i am doing wrong.
Jai