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

RadToolTip for RadCalendar

3 Answers 124 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Y L
Top achievements
Rank 1
Y L asked on 08 Jun 2010, 05:31 PM
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 
 
            con.Open() 
            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 !

3 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 14 Jun 2010, 09:46 AM
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,
Svetlina
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.
0
Prashanti
Top achievements
Rank 1
answered on 08 Apr 2011, 10:47 PM
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.
0
Svetlina Anati
Telerik team
answered on 13 Apr 2011, 02:35 PM
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:

http://demos.telerik.com/aspnet-ajax/tooltip/examples/tooltipcalendar/defaultcs.aspx 

Kind regards,
Svetlina
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.

Tags
ToolTip
Asked by
Y L
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Prashanti
Top achievements
Rank 1
Share this question
or