RadToolTip for RadCalendar

4 posts, 0 answers
  1. Y L
    Y L avatar
    16 posts
    Member since:
    May 2010

    Posted 08 Jun 2010 Link to this post

    Hi All,

    The example of  ToolTip  / RadToolTip for RadCalendar  can display the appointment details in the tooltip. And it displays only one appointment for the day that has appointments.  Now I'm working on a RadCalendar with RadToolTip and I need the ToolTip to display all events of that day. 

    I passed Start as parameter, my code is:
        Private Function IsDayRegisteredForTooltip(ByVal [date] As DateTime) As DateTime 
            Dim connectionString As String = ConfigurationManager.ConnectionStrings("eCalendarConnectionString").ConnectionString 
            Dim con As New SqlConnection(connectionString) 
            Dim cmd As New SqlCommand("SELECT   Start FROM tblActivities WHERE convert( varchar(10), Start, 101 ) = convert( varchar(10), @Start, 101 )", con) 
            cmd.Parameters.Add(New SqlParameter("@Start", [date])) 
            Using con 
                Dim result As Object = cmd.ExecuteScalar() 
                Return result 
            End Using 
        End Function 
        Protected Sub RadCalendar1_DayRender(ByVal sender As Object, ByVal e As Telerik.Web.UI.Calendar.DayRenderEventArgs) 
            Dim returnedStartDate As DateTime = IsDayRegisteredForTooltip(e.Day.[Date]) 
            Dim cell As TableCell = e.Cell 
            cell.Attributes.Add("onmouseover", "ShowToolTip(this);") 
            cell.Attributes.Add("id", "Calendar1_" + e.Day.Date.ToString()) 
            cell.Attributes.Add("startDate", returnedStartDate.ToString()) 
        End Sub 

    Then I got error "SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM."
    I don't know how to do with this. Please help. Thanks !

  2. Svetlina Anati
    Svetlina Anati avatar
    2795 posts

    Posted 14 Jun 2010 Link to this post

    Hello Y L,

    I have already answered your support thread with a demo attached to it. Please, examine my reply there and then let me know if you have other questions left.

    Sincerely yours,
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft R3 2016 release webinar banner
  4. Prashanti
    Prashanti avatar
    2 posts
    Member since:
    Mar 2011

    Posted 08 Apr 2011 Link to this post

    Hey I need the same code that displays all the events of a particualr date on mouseover of a date, Can you please send the same demo code to me.
  5. Svetlina Anati
    Svetlina Anati avatar
    2795 posts

    Posted 13 Apr 2011 Link to this post

    Hello Prashanti,

    The problem discussed in this thread was related to custom database code and not to RadCalendar with RadToolTip integration. What I suggest is to examine the following online demo which shows how to achieve what you need:


    Kind regards,
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top