Posted 20 April 2018, 8:22 am EST
Is it possible to “ownerdraw” the C1 Schedulers Appointment Layout?
For example I’d need to make Borders around certain appointments …
Forums Home / ComponentOne / WinForms Edition
Posted by: andreas.kren on 20 April 2018, 8:22 am EST
Posted 20 April 2018, 8:22 am EST
Is it possible to “ownerdraw” the C1 Schedulers Appointment Layout?
For example I’d need to make Borders around certain appointments …
Posted 23 April 2018, 9:00 am EST
Hello Andreas,
There is no direct way in C1Scheduler to OwnerDraw the appointments. However, using it in association with other controls, it seems to be possible. Therefore, could you please have a look at attached sample application and see if it helps you.
Regards,
Ruchir AgarwalC1Scheduler_Custom.zip
Note: In order to run the application please make VS environment 32 bit
Posted 23 April 2018, 10:47 am EST
Thank you very much. I ll have a look at the attached example.
Posted 23 April 2018, 11:21 am EST - Updated 4 October 2022, 2:45 am EST
I have to realize a “only viewable” calender (see my attached Screenshot). No need to add/edit/remind/dragdrop and all the features c1Scheduler is offering. As I understand your example concentrates on filtering scheduled dates (or do I overlook sth?)
My need is mainly about showing work projects that last more than one day. This has to be illustrated in a “one view and realize it” - way … the data is edited somewhere else.
The question 4 me is: is more work for me to “draw the calendar” all on my own or is with
lesser work senseful to use the c1Scheduler control.
Hope you understand me.
Posted 25 April 2018, 9:21 am EST
Hello, I am discussing this requirement with the concerned team and will get back to you once I receive some information [ID: 319342].
Thanks,
Ruchir Agarwal
Posted 26 April 2018, 1:34 am EST
Hi,
As per investigation, in the current version it is not possible to customize appointment borders. The only thing one can do is to show some highlight in individual appointments using Html layout, as follows:```
c1Schedule1.BeforeAppointmentFormat += C1Schedule1_BeforeAppointmentFormat;
private void C1Schedule1_BeforeAppointmentFormat(object sender, BeforeAppointmentFormatEventArgs e)
{
// check appointment properties and alter appearance accordingly
if (c1Schedule1.ViewType != ScheduleViewEnum.MonthView && !e.Appointment.AllDayEvent)
{
// add red line on the top
e.Text = “
~Ruchir Agarwal
Posted 26 April 2018, 7:13 am EST
Ok thank you. Hm … It could work that way if I could guarantee that the text “fills” the appointment. The filtering which appoint with which border (left/right/top/bottom/color) could be done within (own tags in) the text.
Is this “normal” html interpreting in the .text property ? “<” “br” “>”
for example doesnt seem to work.
Sorry if this is a silly question.
Posted 26 April 2018, 7:28 am EST
Got it …
" Line1 <br> Line2 <br> Line3"
Posted 27 April 2018, 4:03 am EST
Hi,
Glad that you were able work it out and that we were able to help you.
Regards,
Ruchir Agarwal