Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ScheduleView Control- Timeslot selection feature (Read 3202 times)
Sooriya29041989
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 1
Joined: Oct 29th, 2013
ScheduleView Control- Timeslot selection feature
Oct 29th, 2013 at 6:15am
Print Post  
I want to use Scheduler control in my application. I wanted to check if the control has option to select timeslots and display only the selected timeslots.

Currently I can filter the timeslot by setting start time and end time
Example: If Start time - 8:00 PM and End time - 11:00 PM
It displays the timeslot as below (in week view) :

     Monday      Tuesday      Wednesday      Thursday 8:00 PM                                          
8:30PM                                          
9:00PM                                          
9:30PM                                          
10:00PM                                          
10:30PM                                          

Please let me know whether the time slot in Scheduler can be implemented as shown below.

If user wants to see only for 8, 8:30, 10, 11 then grid have to be displayed as:

     Monday      Tuesday      Wednesday      Thursday 8:00 PM                                          
8:30PM                                          
10:00PM                                          
11:00PM                                          


Please let us know if there is any other control  which supports the above scenario.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: ScheduleView Control- Timeslot selection feature
Reply #1 - Oct 29th, 2013 at 7:00am
Print Post  
Hi,

You cannot display irregular time intervals in the Timetable view. What you can do is hide some of the dates displayed in the timeline, but in this case the visible times will be spaced unevenly. For example 8:00 and 8:30 will be closer together than 8:30 and 10:00. To hide specific texts from the timeline, you can use the CustomizeText event. For example, to hide the texts corresponding to 9:00, 9:30 and 10:30 in the range 8:00-11:00, use the following code:

Code
Select All
calendar.CustomizeText += calendar_CustomizeText;

calendar.TimetableSettings.StartTime = 60 * 20;
calendar.TimetableSettings.EndTime = 60 * 23;
calendar.TimetableSettings.GroupHours = State.Disabled;
calendar.TimetableSettings.TimelineSize = 60;
calendar.TimetableSettings.CellSize = 50;

// ...

void calendar_CustomizeText(object sender, CalendarTextEventArgs e)
{
	if (e.Element == CalendarTextElements.TimetableTimeline)
	{
		if (e.StartTime == TimeSpan.FromHours(21.0) ||
			e.StartTime == TimeSpan.FromHours(21.5) ||
			e.StartTime == TimeSpan.FromHours(22.5))
			e.Text = "";
	}
} 



I hope this helps.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint