Q: How to configure the
range of worktime start and end to be different?
In the Timetable view, I want to configure the range of worktime start and end to be different on multiple days, and if possible to be non-current. The app needs to be able to deal with people who have flexible work schedules and work, perhaps on Mondays from 8-12, Tuesdays 9-11 and again from 4-6. Is it possible to get the work day settings to apply to a range of dates and times rather then having only a single "work day" set from 8-5?
A: You cannot specify different work time ranges for different days but, since the only thing affected by the work time settings is the way cells are drawn, you can use custom painting to achieve the same result.
back
to top
Q: I am using the single month view and have multiple appointments per day. What should I set so that the appointment details could be seen while viewing the calendar?
A: You can use custom drawing or custom item viewers in order to display the items in the way which suits you best.
back
to top
Q: In resource view, I'd like to highlight today's date on the timeline header.
A: You have to set Calendar.CustomDraw to CustomDrawElement.ResourceViewTimelineCell and handle the Calander.Draw event. The event handler implementation should look similar to the following:
private void calendar1_Draw(object sender,
MindFusion.Scheduling.WinForms.CustomDrawArgs e)
{
if (e.Element == CustomDrawElements.ResourceViewTimelineCell)
{
if (e.Date.Date == DateTime.Today)
{
e.Graphics.DrawRectangle(Pens.Red, e.Bounds);
}
}
}
back
to top
Q: Is there a property that can be set to make the grid Read-Only in Timetable View? I need it to allow the user only to see everything in the view, but not to add, move, or remove anything.
A: Unfortunately, there is no single property to perform this. However, you can set several properties instead, to achieve similar functionality. Set Calendar.AllowInplaceCreate and Calendar.AllowInplaceEdit to false and ensure that every single item in your schedule has its AllowMove, AllowChangeStart and AllowChangeEnd properties set to false as well. You can also handle the Calendar.ItemSelecting event to prevent items from being selected.
back
to top
Q: Can I somehow enlarge the height of each line in the timetable view?
A: Use the Calendar.TimetableSettings.CellSize property.
back
to top
Q: Is it possible to see the resource view detailed by hours/minutes? If yes, is it possible to hide not working hours?
A: The Resource view can display up to three timelines, whose properties are accessible through the BottomTimelineSettings, MiddleTimelineSettings and TopTimelineSettings members of the Calendar.ResourceViewSettings object. If you need to divide the bottom timeline into 15 minute intervals, you can do that by setting the following properties:
calendar.ResourceViewSettings.BottomTimelineSettings.Format = "hh:mm";
calendar.ResourceViewSettings.BottomTimelineSettings.Unit =
MindFusion.Scheduling.WinForms.TimeUnit.Minute;
calendar.ResourceViewSettings.BottomTimelineSettings.UnitCount = 15;
Use the VisibleStartTime and VisibleEndTime properties of ResourceViewSettings to make only the working hours visible.
back
to top
Q: I need to bound calendar data into database: is there a database schema of the calendar's objects?
A: Planner.NET supports databinding only in its build for the .NET Framework 2.0. As for the schema, there is a Planner.mdb file in the Samples/DataBinding directory where you have installed Planner.NET on your computer. You can also perform various mappings between fields in your database and the properties of the Planner.NET objects. For more information on databinding, check Tutorial #9 in the accompanying documentation.
back
to top
Q: How to resize the timeline scale?
I am using the Planner in Resource view. I need to resize the TimelineScale to see from 28 up to 31 columns, depending on the selected month. Can I find out either the width of a single column or the last visible day with the actual selected TimelineScale or is there any other solution I didn't get yet?
A: You can obtain the currently visible start and end dates through the GetFirstVisibleDate and GetLastVisibleDate methods of the Calendar class. These methods take into consideration the current timeline scale.
back
to top
|