Chris Scallion
Top achievements
Rank 1
Chris Scallion
asked on 17 Jan 2011, 11:36 PM
Is there a way to increase the status indicator width for appointments?
6 Answers, 1 is accepted
0
Richard Slade
Top achievements
Rank 2
answered on 19 Jan 2011, 09:09 PM
Hi Chris,
Please could you show with a screenshot or explain in further detail what you would like to change and I will do my best to help
thanks
Richard
Please could you show with a screenshot or explain in further detail what you would like to change and I will do my best to help
thanks
Richard
0
Chris Scallion
Top achievements
Rank 1
answered on 19 Jan 2011, 09:19 PM
Sure.... see the png...
0
Richard Slade
Top achievements
Rank 2
answered on 19 Jan 2011, 10:56 PM
Hi Chris,
Unfortunatly, I haven't been able to find a way to do this. It seems that this part of the appointment is painted using a StatusBrush as part of the AppointmentElement and cannot be changed.
You can however set your own status types in the following way:
I hope that helps
Richard
Unfortunatly, I haven't been able to find a way to do this. It seems that this part of the appointment is painted using a StatusBrush as part of the AppointmentElement and cannot be changed.
You can however set your own status types in the following way:
Me
.RadScheduler1.Statuses.Clear()
Me
.RadScheduler1.Statuses.Add(
New
AppointmentStatusInfo(1,
"In Office"
, Color.Green, Color.Orange, AppointmentStatusFillType.Solid))
I hope that helps
Richard
0
Hi Chris Scallion,
Thank you for writing.
At the moment this property is not exposed, but you can access it through reflection. The code snippet bellow changes the value of the private field appointmentTypeAreaWidth which contains the width of the status area.
If you have other questions, do not hesitate to contact me.
Greetings,
Dobry Zranchev
the Telerik team
Thank you for writing.
At the moment this property is not exposed, but you can access it through reflection. The code snippet bellow changes the value of the private field appointmentTypeAreaWidth which contains the width of the status area.
void
radScheduler1_AppointmentFormatting(
object
sender, SchedulerAppointmentEventArgs e)
{
typeof
(AppointmentElement).GetField(
"appointmentTypeAreaWidth"
, System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).SetValue(e.AppointmentElement, 15);
}
If you have other questions, do not hesitate to contact me.
Greetings,
Dobry Zranchev
the Telerik team
0
Richard
Top achievements
Rank 1
answered on 13 Oct 2011, 03:34 AM
Hello Dobry,
I found that the suggested solution using reflection does not work if the Scheduler is displaying appointment in Resources mode.
Here is my code:
Am I missing something? Or this does not indeed work in Resources mode?
Thanks.
I found that the suggested solution using reflection does not work if the Scheduler is displaying appointment in Resources mode.
Here is my code:
Private
Sub
radScheduler1_AppointmentFormatting(sender
As
Object
, e
As
SchedulerAppointmentEventArgs)
Handles
radScheduler1.AppointmentFormatting
Type.
GetType
(
"AppointmentElement"
).GetField(
"appointmentTypeAreaWidth"
, Reflection.BindingFlags.Instance
Or
Reflection.BindingFlags.NonPublic).SetValue(e.AppointmentElement, 10)
End
Sub
Am I missing something? Or this does not indeed work in Resources mode?
Thanks.
0
Hi Richard,
Thank you for your question.
I confirm that running the code you have provided results in an Object reference exception. The problem seems to be in the C# to VB conversion. Please try the following code:
I hope this helps. Should you have further questions, feel free to ask.
Regards,
Ivan Todorov
the Telerik team
Thank you for your question.
I confirm that running the code you have provided results in an Object reference exception. The problem seems to be in the C# to VB conversion. Please try the following code:
Private
Sub
radScheduler1_AppointmentFormatting(sender
As
Object
, e
As
SchedulerAppointmentEventArgs)
Handles
radScheduler1.AppointmentFormatting
GetType
(AppointmentElement).GetField(
"appointmentTypeAreaWidth"
, Reflection.BindingFlags.Instance
Or
Reflection.BindingFlags.NonPublic).SetValue(e.AppointmentElement, 10)
End
Sub
I hope this helps. Should you have further questions, feel free to ask.
Regards,
Ivan Todorov
the Telerik team
Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.