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

TargetControlID=radDatePicker

1 Answer 73 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Sidharth
Top achievements
Rank 1
Sidharth asked on 21 Mar 2012, 04:32 PM
Dear all,

I'm trying to setup a radtooltip that will appear (ShowEvent="OnFocus") when the user clicks on a radDatePicker. I've tried to set the TargetControlID to be the radDatePicker's ID, ID + "_wrapper" and also tried  ID + "_dateInput_text". Is this even possible? If so how can it be done?

Kind regards
Sidharth

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 23 Mar 2012, 03:25 PM
Hi Sidharth,

I am not sure I understand exactly when and where you want to show the tooltip.

If you want it shown when the popup appears (i.e. the user clicks on the button) the easiest way to do so is to show it via JavaScript:
<telerik:RadDatePicker runat="server" ID="rdp1" ClientEvents-OnPopupOpening="OnPopupOpening">
</telerik:RadDatePicker>
<telerik:RadToolTip runat="server" ID="rtt1" Text="lorem ipsum dolor sit amet" TargetControlID="rdp1_popupButton"
    IsClientID="true" Position="BottomRight" RelativeTo="Element" ShowEvent="FromCode"
    HideEvent="ManualClose">
</telerik:RadToolTip>
and
function OnPopupOpening()
{
    $find('rtt1').show();
}



If you want it to show when the user focuses the input field you can target the datepicker's input control:
<telerik:RadDatePicker runat="server" ID="rdp1">
</telerik:RadDatePicker>
<telerik:RadToolTip runat="server" ID="rtt1" Text="lorem ipsum dolor sit amet" TargetControlID="rdp1_dateInput"
    IsClientID="true" Position="BottomRight" RelativeTo="Element" ShowEvent="OnFocus"
    HideEvent="ManualClose">
</telerik:RadToolTip>


Where in both cases you need the ClientID of the datepicker and add the _dateInput or _popupButton suffix to it.


All the best,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ToolTip
Asked by
Sidharth
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or