Hi Snowy,
Thank you for contacting Syncfusion support.
Based on the shared information we have analyzed your requirement Customize time Label to have Room number instead of time and your requirements can be achieved using Schedule WeekView or TimeLineView. You can customize Time Label text using TimeFormat property of TimeLineLabelSettings.
TimeFormat property can be used to provide room numbers as Label content,
TimelineViewSettings timelineViewSettings = new TimelineViewSettings();
TimelineLabelSettings labelSettings = new TimelineLabelSettings();
labelSettings.TimeFormat = string.Format(" 'Room' ") + " " + "H";
timelineViewSettings.LabelSettings = labelSettings;
schedule.TimelineViewSettings = timelineViewSettings;
|
As default schedule will have 24 time slots if you want to change the number of time slots you can use either StartHour and EndHour or TimeInterval properties of Scheule.
If you want to have less than 24 slots its recommended to use StartHour and EndHour properties.
TimelineViewSettings timelineViewSettings = new TimelineViewSettings();
timelineViewSettings.StartHour = 0;
timelineViewSettings.EndHour = 15;
schedule.TimelineViewSettings = timelineViewSettings; |
If you want more than 24 slots, this can also be achieved using TimeInterval property. If we set TimeInterval = 10 then one-hour slot will be split into 6 slots.
schedule.TimeInterval = 1;
TimelineViewSettings timelineViewSettings = new TimelineViewSettings();
timelineViewSettings.StartHour = 0;
timelineViewSettings.EndHour = 1;
TimelineLabelSettings labelSettings = new TimelineLabelSettings();
labelSettings.TimeFormat = string.Format(" 'Room' ") + " " + "mm";
timelineViewSettings.LabelSettings = labelSettings;
schedule.TimelineViewSettings = timelineViewSettings;
|
Above code snippet will split an hour into 60 slots and Room numbers increased based on Minute value.
Kindly Refer our UG document to know more about TimeLineView settings customization,
We have prepared a sample for the same,
We hope this helps. Kindly revert us if you have any concern.
Regards,
Subburaj Pandian V