<%@ Page Language="VB" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="RadControlsWebApp3._Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title> <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" /></head><body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> <Scripts> <%--Needed for JavaScript IntelliSense in VS2010--%> <%--For VS2008 replace RadScriptManager with ScriptManager--%> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" /> </Scripts> </telerik:RadScriptManager> <script type="text/javascript"> //Put your JavaScript code here. </script> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> </telerik:RadAjaxManager> <div> press enter key when the textbox has focus with empty string. <telerik:RadTextBox runat="server" ID="TextBox1" > </telerik:RadTextBox> <telerik:RadButton runat="server" ID="Button1" Text="do not click" UseSubmitBehavior="true"></telerik:RadButton> <asp:Label runat="server" ID="label1"></asp:Label> </div> <asp:RequiredFieldValidator ID="RequiredFieldValidatorTextBox1" runat="server" Display="None" SetFocusOnError="true" ErrorMessage="please type anything." ControlToValidate="TextBox1" ValidationGroup="test1"></asp:RequiredFieldValidator> <asp:ValidationSummary ID="ValidationSummarySave" runat="server" ShowSummary="false" ShowMessageBox="true" ValidationGroup="test1" /> </form></body></html>

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>