This is a migrated thread and some comments may be shown as answers.

RadToolTip within Formview inside RadAjaxPanel

2 Answers 78 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
fatma
Top achievements
Rank 1
fatma asked on 02 Jan 2009, 04:23 PM
Hi,

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>

 

 

&nbsp;

 

 

&nbsp;&nbsp;&nbsp;&nbsp;

 

 

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px"

 

 

Width="300px">

 

 

&nbsp;<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>&nbsp;

 

 

<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> &nbsp;

 

 

</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>

 

 

&nbsp;&nbsp;

 

 

<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>

 

 

&nbsp;<br />

 

 

<br />

 

 

<br />

 

 

<br />

 

 

 

</div>

 

2 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 05 Jan 2009, 10:14 AM
Hi Fatma,

As I already explained in your other thread, it is much better approach to provide a fully runnable sample demo because this helps us faster and better understand the problem. As far as I can see from the provided code, you update the target controls but you do not update the tooltips - that was my previous assumption as I already told you in your other thread. Did you try the suggested solution of updating the tooltips together with the form view? If so what was the result and did this fix the problem?

In case this does not help, please prepare a sample demo, e.g. use Northwind for database, open a new support ticket and attach the whole, fully runnable demo there along with detailed explanations.


Sincerely yours,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
fatma
Top achievements
Rank 1
answered on 05 Jan 2009, 04:55 PM
Hi Svetlina,

I tried your suggested solution of updating the tooltips, and it works now.

Thanks,
Tags
ToolTip
Asked by
fatma
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
fatma
Top achievements
Rank 1
Share this question
or