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

[Solved] show start time onfocus of a timeslot

2 Answers 98 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Indranik
Top achievements
Rank 1
Indranik asked on 16 Jan 2009, 01:36 PM
How do i show start time of a timeslot as a tooltip on focus of a timeslot?

2 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 19 Jan 2009, 01:39 PM
Hello Indranik,

There isn't an OnClientTimeSlotFocus event, but you can consider using OnClientTimeSlotClick. The following example shows how to open RadTooltip on a client event:
http://demos.telerik.com/aspnet-ajax/ToolTip/Examples/ClientSideAPI/DefaultCS.aspx


Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Lukas
Top achievements
Rank 2
answered on 28 Apr 2009, 02:55 PM
Hi there,

maybe a little late, but I ran into the same problem and found a workaround.

You can use the server-side RadScheduler.OnTimeslotCreate Event:

    Protected Sub RadScheduler1_TimeSlotCreated(ByVal sender As ObjectByVal e As Telerik.Web.UI.TimeSlotCreatedEventArgs) Handles RadScheduler1.TimeSlotCreated 
 
        e.TimeSlot.Control.Attributes.Add("onmouseover""javascript:onTimeslotMouseOver(this,'" & e.TimeSlot.Start.ToLongTimeString & "')"
 
    End Sub 

After this you can use 'onTimeslotMouseOver' as callback function in your client-script:

function onTimeslotMouseOver(sender, startTime) 
    alert(startTime); 

You only need to implement some code for your custom tooltip, e.g. a RadToolTip Control or simply add a <div>-Element at mouse position or something like that.

BUT: This creates a MASSIVE overhead in the Markup-Code (almost doubled the size of my aspx-Page from 160Kb to 277Kb)
But as I use this in an intranet application it doesn't matter for me.

Hope this helps,

Lukas
Tags
Scheduler
Asked by
Indranik
Top achievements
Rank 1
Answers by
Peter
Telerik team
Lukas
Top achievements
Rank 2
Share this question
or