RadScheduler Tooltip from different field

3 posts, 0 answers
  1. Sheepdog
    Sheepdog avatar
    72 posts
    Member since:
    Nov 2005

    Posted 26 Mar 2009 Link to this post

    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. Sheepdog
    Sheepdog avatar
    72 posts
    Member since:
    Nov 2005

    Posted 27 Mar 2009 Link to this post

    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 
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Geoff
    Geoff avatar
    53 posts
    Member since:
    Aug 2012

    Posted 15 Jul 2015 in reply to Sheepdog Link to this post

    Thanks Sheepdog, you saved me some time.

     Geoff

Back to Top