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

How to show RadToolTip on Right click in An Appointment

1 Answer 54 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Ahmed
Top achievements
Rank 1
Ahmed asked on 05 Sep 2012, 07:06 PM
How can i show RadTooltip Control when i right click on An Appointment and i want to put rad GridView in that tooltip

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 06 Sep 2012, 05:32 AM
Hi Ahmed,

Try the following code snippet to achieve your scenario.

ASPX:
<telerik:RadScheduler ID="RadScheduler1" runat="server" OnClientAppointmentContextMenu="OnClientAppointmentContextMenu" ........>
</telerik:RadScheduler>
<telerik:RadToolTip ID="RadToolTip1" runat="server" Position="BottomCenter">
    <div id="contentContainer">
       <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="true" DataSourceID="SqlDataSource1">
       </telerik:RadGrid>
    </div>
</telerik:RadToolTip>

JS:
<script type="text/javascript">
    function OnClientAppointmentContextMenu(sender, args) {
        var apt = args.get_appointment();
        showTooltip(apt);
    }
    function showTooltip(apt) {
        var tooltip = $find('<%=RadToolTip1.ClientID %>');
        tooltip.set_targetControl(apt.get_element());
        debugger;
        tooltip.set_text($get("contentContainer").innerHTML);
        setTimeout(function () {
            tooltip.show();
        }, 20);
    }               
</script>

Hope this helps.

Regards,
Princy.
Tags
Scheduler
Asked by
Ahmed
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or