recently we have upgraded RadControls
for ASP.NET AJAX Q1 2010 to ASP.NET AJAX Q1 2012.
i am trying
to open Tooltip on a button click in RadToolBar in javascript. the Tooltip is showing relative to the element. the problem is when page is posted back and i try to open the tooltip it is not showing relative to element (RadToolBar) even though i am setting the targetcontrol on client side.
need some help to resolve this issue.
please find the code below
Contentpage javascript:
function
OnToolbarClientButtonClicking(sender, args) {
var button = args.get_item();
var sCommandName = button.get_commandName();
//alert(button.get_commandName());
if (sCommandName == 'add') {
var hidManage = '<%=hidManageId.ClientID %>'
ShowToolTip(document.getElementById(hidManage).value);
args.set_cancel(
true);
}
}
User Control:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SearchUploadContainer.ascx.cs"
Inherits="AppWeb.ControlLibrary.SearchUploadContainer" %>
<%@ Register Assembly="WebControlLib" Namespace="WebControlLib" TagPrefix="ccl" %>
<%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %>
<link rel="stylesheet" type="text/css" href="../StyleSheet.css" />
<ccl:WTToolTip runat="server" ID="wtToolTip" IsClientID="true" TargetControlID="ManageToolbar" AutoCloseDelay="0"
ShowEvent="FromCode" HideEvent="FromCode" RelativeTo="Element" Position="MiddleRight"
EnableTheming="true" Modal="true" Width="230px" Height="400px" OnClientShow="SetFocus" >
<div class="contentBlock" style="width: 220px">
<telerik:RadScriptBlock ID="rsb" runat="server">
function ShowToolTip(manage, appttype, dtDate, slotId) {
var tooltip = $find("<%=wtToolTip.ClientID%>");
var txt = $find("<%=txtContainer.ClientID%>");
tooltip.set_targetControlID('');
tooltip.set_targetControlID(manage);
if (appttype != null && appttype != undefined) {
document.getElementById("<%=hdnApptType.ClientID%>").value = appttype;
}
if (dtDate != null && dtDate != undefined) {
document.getElementById("<%=hdnDate.ClientID%>").value = dtDate;
}
if (slotId != null && slotId != undefined) {
document.getElementById("<%=hdnSlotSchedule_id.ClientID%>").value = slotId;
}
EnableDisableControls();
//setTimeout(function () {
tooltip.show();
//}, 1000);
//tooltip.show();
SetFocus();
}
</telerik:RadScriptBlock>
<h2 class="contentBlockTop" style="text-align: left; width: 210px;">
<ccl:WTLabel ID="lblContentTopText" runat="server" Width="210px"></ccl:WTLabel>
<asp:HiddenField ID="hidManageId" runat="server" />
<asp:HiddenField ID="hdnApptType" runat="server" />
<asp:HiddenField ID="hdnDate" runat="server" />
<asp:HiddenField ID="hdnSlotSchedule_id" runat="server" />
</h2>
</ccl:WTToolTip>