14 Answers, 1 is accepted
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.
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
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.
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.
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
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!
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.
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
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
"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.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
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?
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
Brendan