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

ToolTip for calendar

2 Answers 44 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 24 May 2010, 06:06 PM
Hello,

I'm building a RadCalendar with ToolTip to show the time and summary of the events. The example "RadToolTip for RadCalendar " is very helpful, but i'm having a problem that there's always an error "Return Integer.Parse(result.ToString())"--- Input string was not in a correct format. The difference is that I didn't use int for the eventID as the example did, i used uniqueidentifier.
Private Function IsDayRegisteredForTooltip(ByVal [date] As DateTime) As Integer 
        
        Dim connectionString As String = ConfigurationManager.ConnectionStrings("eCalendarConnectionString").ConnectionString 
        Dim con As New SqlConnection(connectionString) 
        
        Dim cmd As New SqlCommand("SELECT GUID 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() 
             
            If result <> Nothing Then 
                Return Integer.Parse(result.ToString()) 
                
            End If 
 
            Return -1 
        End Using 
    End Function 

When I debugged, the result is always 0.
Can someone help me with this? Thank you very much for your help !

2 Answers, 1 is accepted

Sort by
0
Y L
Top achievements
Rank 1
answered on 24 May 2010, 08:03 PM

Can someone help me with this? I got stuck for several days...

Thanks a ton !
0
Petio Petkov
Telerik team
answered on 27 May 2010, 12:08 PM
Hi,

I already made the necessary changes in the project you sent (from the support thread you submitted). You'll find the modified project in the support thread as an attachment.

All the best,
Petio Petkov
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.
Tags
ToolTip
Asked by
Y L
Top achievements
Rank 1
Answers by
Y L
Top achievements
Rank 1
Petio Petkov
Telerik team
Share this question
or