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

RadScheduler Tooltip from different field

2 Answers 405 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Sheepdog
Top achievements
Rank 1
Sheepdog asked on 26 Mar 2009, 06:58 PM
Hello,

I have a working web app with the Radscheduler on a page. I am binding the scheduler to a dataset, and have set the datasource properties correctly

rsDefault.DataSource = myDs

rsDefault.DataKeyField = "EventID"

 

rsDefault.DataStartField = "StartDate"

 

rsDefault.DataSubjectField = "ShortTitle"

 

rsDefault.DataEndField = "EndDate"

the Tooltip on the scheduler is displaying the ShortTitle field just fine. However the user would like the tooltip to contain the text from the FullTitle field and keep the ShortTitle field displaying on the scheduler.

It would be great if there was a DataToolTipField method in the scheduler.

Can I change this behaviour in the Databinding event of the scheduler?

Thanks
G

 

2 Answers, 1 is accepted

Sort by
0
Sheepdog
Top achievements
Rank 1
answered on 27 Mar 2009, 12:50 PM
OK, so I figured this out on my own. To change the tooltip from the DataSubjectField to a different field in your databound object you will set it in the Appointment Databound event

 Protected Sub rsDefault_AppointmentDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerEventArgs) Handles rsDefault.AppointmentDataBound  
        Dim mydrow As DataRowView   'object to hold the appointment dataitem  
 
        Try  
            'my personal coloring scheme  
            e.Appointment.CssClass = "M360Style" 
            e.Appointment.BackColor = Drawing.Color.DarkGray  
            e.Appointment.BorderColor = Drawing.Color.DarkGray  
            e.Appointment.AllowDelete = False 
            'end of coloring scheme  
 
            'Set the appointment tooltip to different field  
            mydrow = CType(e.Appointment.DataItem, DataRowView) 'set the dataitem to the datarowview object dimed above  
            e.Appointment.ToolTip = mydrow.Item("Title").ToString 'simply set the appointment tooltip to the proper field in the DataRowView  
            'finished setting tooltip  
 
        Catch ex As Exception  
            Session("Errors") = ex.Message.ToString  
            Throw ex  
        End Try  
 
    End Sub 
0
Geoff
Top achievements
Rank 1
answered on 15 Jul 2015, 02:17 PM

Thanks Sheepdog, you saved me some time.

 Geoff

Tags
Scheduler
Asked by
Sheepdog
Top achievements
Rank 1
Answers by
Sheepdog
Top achievements
Rank 1
Geoff
Top achievements
Rank 1
Share this question
or