I have a fromview with two radtooltips. It works fine without RadAjaxPanel.
With RadAjaxPanel RadToolTips doesn't work once I click "save" or "cancel" button. I have to refresh the page to get tooltips works.
Thanks,
Here is the code:
<%
@ Control Language="C#" AutoEventWireup="true" CodeFile="test.ascx.cs" Inherits="test" %>
<%
@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<
telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<
script type="text/javascript">
function clientShow(sender, eventArgs)
{
var textbox2 = (document.getElementById("<%=TextBox2.ClientID %>"));
textbox2.focus();
var textbox1 = (document.getElementById('<%=FormView1.FindControl("TextBox1").ClientID %>')).value;
(document.getElementById(
"<%=TextBox2.ClientID %>")).value = textbox1;
}
function clientShow1(sender, eventArgs)
{
var textbox20 = (document.getElementById("<%=TextBox4.ClientID %>"));
textbox20.focus();
var textbox10 = (document.getElementById('<%=FormView1.FindControl("TextBox3").ClientID %>')).value;
(document.getElementById(
"<%=TextBox4.ClientID %>")).value = textbox10;
}
function PopTB()
{
var textbox2 = (document.getElementById("<%=TextBox2.ClientID %>")).value;
(document.getElementById(
'<%=FormView1.FindControl("TextBox1").ClientID %>')).value = textbox2;
// var tooltip1 = $find("RadToolTip1");
var tooltip1 = $find("<%=RadToolTip1.ClientID%>");
tooltip1.hide();
}
function PopTB1()
{
var textbox3 = (document.getElementById("<%=TextBox4.ClientID %>")).value;
(document.getElementById(
'<%=FormView1.FindControl("TextBox3").ClientID %>')).value = textbox3;
var tooltip2 = $find("<%=RadToolTip2.ClientID%>");
tooltip2.hide();
}
</
script>
</
telerik:RadCodeBlock>
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<div>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px"
Width="300px">
<asp:FormView ID="FormView1" runat="server" DefaultMode="Edit" DataSourceID="SqlDataSource1" OnPageIndexChanging="FormView1_PageIndexChanging">
<InsertItemTemplate>
<asp:TextBox ID="TextBox1" Text="This is my text" runat="server" Height="75px" TextMode="MultiLine" Width="372px" ></asp:TextBox>
<br />
<br />
<asp:TextBox ID="TextBox3" runat="server" Height="75px" Text="This is my second text"
TextMode="MultiLine" Width="372px"></asp:TextBox><br />
<asp:Button ID="Button3" runat="server" CommandName="Insert" Text="insert" />
<asp:Button ID="Button4" runat="server" CommandName="Cancel" Text="Cancel" /><br />
</InsertItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Height="75px" Text='<%# Bind("CODE") %>'
TextMode="MultiLine" Width="372px"></asp:TextBox><br />
<asp:TextBox ID="TextBox3" runat="server"
Height="75px" Text='<%# Bind("MESSAGE") %>' TextMode="MultiLine" Width="372px"></asp:TextBox><asp:Button
ID="Button3" runat="server" CommandName="Update" Text="Save" /><asp:Button ID="Button4"
runat="server" CommandName="Cancel" Text="Cancel" />
</EditItemTemplate>
</asp:FormView>
</telerik:RadAjaxPanel>
<br />
<br />
<br />
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ATR2_DELETEConnectionString %>"
DeleteCommand="DELETE FROM [ErrorCumulative] WHERE [Record_Id] = @Record_Id"
InsertCommand="INSERT INTO [ErrorCumulative] ([CODE], [MESSAGE]) VALUES (@CODE, @MESSAGE)"
SelectCommand="SELECT [Record_Id], [CODE], [MESSAGE] FROM [ErrorCumulative]"
UpdateCommand="UPDATE [ErrorCumulative] SET [CODE] = @CODE, [MESSAGE] = @MESSAGE WHERE [Record_Id] = @Record_Id">
<DeleteParameters>
<asp:Parameter Name="Record_Id" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="CODE" Type="String" />
<asp:Parameter Name="MESSAGE" Type="String" />
<asp:Parameter DefaultValue="1" Name="Record_Id" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="CODE" Type="String" />
<asp:Parameter Name="MESSAGE" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
<telerik:RadToolTip ID="RadToolTip1" runat="server" Animation="Resize" Height="300px"
ManualClose="True" OnClientShow="clientShow" RelativeTo="Element" ShowEvent="OnClick"
Skin="Web20" TargetControlID="TextBox1" Width="557px">
<asp:TextBox ID="TextBox2" runat="server" Height="265px" TextMode="MultiLine" Width="550px"></asp:TextBox>
<asp:Button ID="Button1" runat="server" OnClientClick="PopTB(); return false;" Text="Insert" /></telerik:RadToolTip>
<br />
<br />
<telerik:RadToolTip ID="RadToolTip2" runat="server" Animation="Resize" Height="300px"
ManualClose="True" OnClientShow="clientShow1" RelativeTo="Element" ShowEvent="OnClick"
Skin="Web20" TargetControlID="TextBox3" Width="557px">
<asp:TextBox ID="TextBox4" runat="server" Height="265px" TextMode="MultiLine" Width="550px"></asp:TextBox>
<asp:Button ID="Button2" runat="server" OnClientClick="PopTB1(); return false;" Text="Insert" /></telerik:RadToolTip>
<br />
<br />
<br />
<br />
</div>