Calendar Specialdays

15 posts, 1 answers
  1. Segurihigiene Medicina no Trabalho, SA
    Segurihigiene Medicina no Trabalho, SA avatar
    2 posts
    Member since:
    Dec 2009

    Posted 25 Mar 2010 Link to this post

    hi,

    i have a calendar and i am adding a special days list by user.
    the first time i all goes well but when i tried to change the user and show the special days for the changed user it stays with the first user specialDays.

    Can anyone help me please,

    Tanks in advanced,

    Best regards,

    hasm


  2. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 26 Mar 2010 Link to this post

    Hello,

    Thank you for the question.

    Please note that before adding the SpecialDays of the second user you should clear the SpecialDays collection of the first user. I am attaching a sample project which behaves correctly on my side. If you continue experiencing the issue even after you clear the SpecialDays collection, please send me a sample project which demonstrates the issue. You can send the project in the support ticket that you have opened. This will allow me to help you further.


    Greetings,
    Nikolay
    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. UI for WinForms is Visual Studio 2017 Ready
  4. Segurihigiene Medicina no Trabalho, SA
    Segurihigiene Medicina no Trabalho, SA avatar
    2 posts
    Member since:
    Dec 2009

    Posted 29 Mar 2010 Link to this post

    Hi ,
    tanks for the answer.

    Ok, what i am doing is this

     

    foreach (DataRow dr in dt.Rows)

    {

    //rCal.SpecialDays.Remove(new RadCalendarDay(Convert.ToDateTime(dr["data"]).Date));

    var rlbi = new RadListBoxItem(Convert.ToDateTime(dr["data"]).Date.ToShortDateString());

    rLBDates.Items.Add(rlbi);

    lbl = new RadLabel

    {

    Text = Convert.ToDateTime(dr["data"]).Day.ToString(),

    TextAlignment = ContentAlignment.MiddleCenter,

    BackColor = Color.ForestGreen,

    ForeColor = Color.DarkViolet

    };

    lbl.BringToFront();

    hostItem = new RadHostItem(lbl)

    {

    ToolTipText =

    dr["idTecnico"] + "-" + dr["tecnicoNome"] + "-" + dr["estado"] + " ",

    BackColor = Color.ForestGreen,

    ForeColor = Color.DarkViolet

    };

    hostItem.BringToFront();

    rcd = new RadCalendarDay(dc)

    {

    TemplateItem = hostItem,

    Date = Convert.ToDateTime(dr["data"].ToString()),

    ToolTip = "dsdsadas",

    };

    dc.Add(rcd);

    }
    so when i make rCal.SpecialDays.clear() it does nothing...

    Can you help me please.

    Tanks in advanced,

    Best regards,

    Helder Marques

  5. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 01 Apr 2010 Link to this post

    Hi Helder,

    You can find the answer to your question in the support ticket that you have opened.

    In case our community is interested in the topic, here is my response in the ticket:
    I am still not able to reproduce the describe issue. Please refer to the updated sample project attached to my current reply. Since I am not able to reproduce the issue in a sample project it seems that there is something special in your project which makes the issue appear. Please send me this project as it will allow me to investigate your case in details and provide you with further assistance.

    Kind regards,
    Nikolay
    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.
  6. sonam
    sonam avatar
    19 posts
    Member since:
    Jan 2011

    Posted 11 Apr 2011 Link to this post

    Hi Telerik,
     what i am asking here , has already asked by me in a saperate thread, but u did not answer me.
    i want to display a calender in silverlight with special days selected.but in silverlight i found that special days proeprty is not there in radcalender,raddatepicker and other calender controls (if i am correct).
    pls lt me know how to acheive it in silverlight as soon as possible.
  7. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 11 Apr 2011 Link to this post

    Hello,

    Please check the reply in the other forum thread here:
    http://www.telerik.com/community/forums/silverlight/calendar/radcalender-control-problem.aspx

    Best wishes,
    Yana
    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
  8. flanky
    flanky avatar
    4 posts
    Member since:
    Jul 2010

    Posted 14 Apr 2011 Link to this post

    Hi.
    I find that if i have more than 90 special days put into Radcalendar.it takes more than 7 seconds to load the redcalendar.
    It is too slow.
    Do you have any idea about this?
    thanks in advance!
  9. Answer
    flanky
    flanky avatar
    4 posts
    Member since:
    Jul 2010

    Posted 14 Apr 2011 Link to this post

    I find the solution!
    Do not add the special days  into radcalendar one by one,just put the special days into a collection first,then add the collcetion into radcalendar at a time. It wroks! less than 1s.

  10. Brendan
    Brendan avatar
    52 posts
    Member since:
    Dec 2011

    Posted 27 Mar 2013 Link to this post

    I am using the Telerik controls from Winforms_2013_1_220.  No matter what I do I cannot get the special days tooltip to show up or work.  I downloaded the 'RadCalSpecialDays' project and the tooltip did not work there either.  Is this broken in the version I am using?  Or am I doing something wrong. 

    From the getting started calendar video it looks as though I should be able to add a RadCalender, add a special day, add a tooltip (in the video they used July 4, Independence Day).  When I run the project the tooltip should work, but it doesn't.  I have AllowTooltips and ShowItemTooltips set to True.

    In code I have also tried;
            Dim myDay As DateTime = "2013-01-15"
            calMyEvents.SpecialDays.Add(New RadCalendarDay(New DateTime(myDay.Year, myDay.Month, myDay.Day, 0, 0, 0)))
            calMyEvents.SpecialDays(myDay).ToolTip = "My Tooltip"
            calMyEvents.FocusedDate = myDay
  11. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 01 Apr 2013 Link to this post

    Hi Brendan,

    Can you please also set the AutoToolTip property of the visual element as follows:
    Private Sub RadCalendar1_ElementRender(sender As Object, e As Telerik.WinControls.UI.RenderElementEventArgs) Handles RadCalendar1.ElementRender
           e.Element.AutoToolTip = True
       End Sub

    Let me know how this works for you.

    All the best,
    Stefan
    the Telerik team
    WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
  12. Brendan
    Brendan avatar
    52 posts
    Member since:
    Dec 2011

    Posted 01 Apr 2013 Link to this post

    Hi Stefan.  When I set "e.Element.AutoToolTip = True", it shows a tooltip for the day number, not the tooltip I set.  For example, if I hover over March 15, the tooltip is "15".  In fact every day now has it's own tooltip.
  13. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 04 Apr 2013 Link to this post

    Hi Brendan,

    Please excuse me for the introduced confusion. It seems that this is an issue with this and it is already logged in our  
    Public Issue Tracking System. Feel free to add your vote for it here: http://www.telerik.com/support/pits.aspx#/details/Issue=12988.

    For the time being you can use the ToolTipText needed event instead:
    Private Sub RadCalendar1_ToolTipTextNeeded(sender As Object, e As Telerik.WinControls.ToolTipTextNeededEventArgs) Handles RadCalendar1.ToolTipTextNeeded
        Dim cell As CalendarCellElement = TryCast(sender, CalendarCellElement)
        If cell IsNot Nothing Then
            If cell.SpecialDay = True Then
                e.ToolTipText = "Special day"
            Else
                e.ToolTipText = "Normal day"
            End If
        End If
    End Sub

    I hope this helps.

    Kind regards,
    Stefan
    the Telerik team
    WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
  14. Brendan
    Brendan avatar
    52 posts
    Member since:
    Dec 2011

    Posted 04 Apr 2013 Link to this post

    Thanks Stefan, but I don't think that is going to work.  I need to load several dates from a db for specific users and would have this type of info;
    02/15/2012, "Payment Due"
    03/22/2012, "Reset Rates"
    03/05/2012, "Business Holiday"
    etc. for many records.

    I need to add the tooltip when I add the date to the calendar as I'm not sure how I could 'know' what the tooltip during the Tooltip_Needed event? I don't want to re-query the database every time I need a tooltip. 

    If there was a .tag for the special day I could add the Tooltip there and call it later on the Tooltip_needed event, but I don't see anything like that.

    Unless there are other suggestions?
  15. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 05 Apr 2013 Link to this post

    Hello Brendan,

    I can suggest using a Hashtable to store your tooltips instead of a Tag. When you populate the SpecialDays, populate the hashtable and then use it in the ToolTipTextNeeded event:
    Imports Telerik.WinControls.UI
     
    Public Class Form1
        Dim tooltips As Hashtable = New Hashtable
     
        Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
            Dim myDay As DateTime = "2013-04-15"
            RadCalendar1.SpecialDays.Add(New RadCalendarDay(New DateTime(myDay.Year, myDay.Month, myDay.Day, 0, 0, 0)))
            RadCalendar1.SpecialDays(myDay).ToolTip = "My Tooltip"
            tooltips.Add(myDay, "tooltip for " + myDay.ToString())
            RadCalendar1.FocusedDate = myDay
        End Sub
     
        Private Sub RadCalendar1_ToolTipTextNeeded(sender As Object, e As Telerik.WinControls.ToolTipTextNeededEventArgs) Handles RadCalendar1.ToolTipTextNeeded
            Dim cell As CalendarCellElement = TryCast(sender, CalendarCellElement)
            If cell IsNot Nothing Then
                If tooltips.Contains(cell.Date) Then
                    Dim tooltip As String = CStr(tooltips(cell.Date))
                    e.ToolTipText = tooltip
                End If
            End If
        End Sub
    End Class

    Let me know how this works for you.
     
    All the best,
    Stefan
    the Telerik team
    WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
  16. Brendan
    Brendan avatar
    52 posts
    Member since:
    Dec 2011

    Posted 12 Apr 2013 Link to this post

    Thank you Stefan for the help on this workaround.  It works very nicely.

    Brendan
Back to Top
UI for WinForms is Visual Studio 2017 Ready