Fabio Cirillo
Top achievements
Rank 1
Fabio Cirillo
asked on 02 Apr 2013, 02:24 PM
how do I put in a tooltip a button and a LinkButton that have to be used?
4 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 03 Apr 2013, 06:56 AM
Hi,
Please check the following mark-up which illustrates a RadToolTip with a RadButton and LinkButton inside it.
ASPX:
Thanks,
Princy.
Please check the following mark-up which illustrates a RadToolTip with a RadButton and LinkButton inside it.
ASPX:
<
telerik:RadButton
ID
=
"RadButton1"
runat
=
"server"
Text
=
"Mouse Over Here to show tooltip"
>
</
telerik:RadButton
>
<
telerik:RadToolTip
ID
=
"RadToolTip1"
runat
=
"server"
TargetControlID
=
"RadButton1"
ManualClose
=
"true"
Width
=
"200px"
Height
=
"100px"
Position
=
"BottomRight"
>
<
telerik:RadButton
ID
=
"RadButton2"
runat
=
"server"
Text
=
"RadButton"
OnClientClicked
=
"OnClientClicked"
>
</
telerik:RadButton
>
<
br
/>
<
br
/>
<
asp:LinkButton
ID
=
"LinkButton1"
runat
=
"server"
Text
=
"LinkButton"
></
asp:LinkButton
>
</
telerik:RadToolTip
>
Thanks,
Princy.
0
Fabio Cirillo
Top achievements
Rank 1
answered on 03 Apr 2013, 08:22 AM
Hi,
the your code function...now i posted the image, please to see it. ther's 2 problem:
1)If you see the image that i posted, is possible approach, for example with the coordinates, the tooltip controlled object without using the position property?
2) when i click on first button into radtooltip i call this code:
when i close the radwindow RadWindowLoadprofile, no longer works the property HideEvent = "LeaveTargetAndToolTip," I can not click on the button inside the tooltip disappears immediately because
Thank you bye
the your code function...now i posted the image, please to see it. ther's 2 problem:
1)If you see the image that i posted, is possible approach, for example with the coordinates, the tooltip controlled object without using the position property?
2) when i click on first button into radtooltip i call this code:
Protected Sub LoadFoto_Click(sender As Object, e As System.EventArgs) Handles LoadFoto.Click
Dim script As String = "function f(){$find(""" + RadWindowLoadprofile.ClientID + """).show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"
ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "key", script, True)
End Sub
when i close the radwindow RadWindowLoadprofile, no longer works the property HideEvent = "LeaveTargetAndToolTip," I can not click on the button inside the tooltip disappears immediately because
Thank you bye
0
Princy
Top achievements
Rank 2
answered on 04 Apr 2013, 06:20 AM
Hi,
1. I guess your first requirement is to display a RadtoolTip containing buttons as shown in the attachment. You can set the Position as TopCenter. Here is the code I tried.
ASPX:
2. I guess your second issue like the RadToolTip is disappearing on RadWindow close. On RadWindow close as well as on RadButtonClick the RadToolTip is hidden. That is the default nature, So you can explicitly show the RadToolTip as follows. Please try the following code snippet.
C#:
JavaScript:
Thanks,
Princy.
1. I guess your first requirement is to display a RadtoolTip containing buttons as shown in the attachment. You can set the Position as TopCenter. Here is the code I tried.
ASPX:
<
telerik:RadToolTip
ID
=
"RadToolTip1"
runat
=
"server"
TargetControlID
=
"RadButton1"
HideEvent
=
"LeaveTargetAndToolTip"
ManualClose
=
"true"
Width
=
"200px"
Height
=
"60px"
Position
=
"TopCenter"
>
<
telerik:RadButton
ID
=
"RadButton2"
runat
=
"server"
Text
=
"RadButton"
OnClientClicked
=
"OnClientClicked"
OnClick
=
"RadButton1_Click"
>
</
telerik:RadButton
>
<
asp:LinkButton
ID
=
"LinkButton1"
runat
=
"server"
Text
=
"LinkButton"
></
asp:LinkButton
>
</
telerik:RadToolTip
>
2. I guess your second issue like the RadToolTip is disappearing on RadWindow close. On RadWindow close as well as on RadButtonClick the RadToolTip is hidden. That is the default nature, So you can explicitly show the RadToolTip as follows. Please try the following code snippet.
C#:
protected
void
RadButton1_Click(
object
sender, EventArgs e)
{
RadToolTip1.Show();
string
script =
"function f(){$find(\""
+ RadWindowLoadprofile.ClientID +
"\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"
;
ScriptManager.RegisterStartupScript(
this
,
this
.GetType(),
"key"
, script,
true
);
}
JavaScript:
<script type=
"text/javascript"
>
function
OnClientClicked(sender, args) {
alert(
"RadButton Client Clicked"
);
}
function
OnClientClose() {
var
radToolTip = $find(
'<%=RadToolTip1.ClientID %>'
);
radToolTip.show();
}
</script>
Thanks,
Princy.
0
Fabio Cirillo
Top achievements
Rank 1
answered on 04 Apr 2013, 10:29 AM
ok the code works! but is possible to set the value of the position of the coordinates of the tooltip? For example in the first image posted the tooltip has a value of Position = "BottomCenter" ... but I wish you could see how the second image posted.