buy now
log in
MindFusion

Q: Is there a SaveToExcel method for exporting the calendar to MS Excel or comma delimited format?

A: It should be easy to export the schedule data as comma delimited text that Excel can import. There is also the Excel Exporter, with which you can export calendars to Excel easy and quickly.

Q: What should I do to save my own property in the SaveTo method of Schedule?

A: In order to enable serialization of your custom items, register the item class for serialization by calling Schedule.RegisterItemClass. Override the SaveTo and LoadFrom methods of the Appointment class and perform the necessary serialization/deserialization of the custom data there. Call the base class SaveTo and LoadFrom methods from your overrides so the Appointment class can serialize/deserialize its standard properties. For an example on how to do this, check Tutorial #4 in the documentation.

Q: Is it possible to make Complex Data Binding between Oracle or MSSQL databases and the Planner.NET?

A: The databinding is only available in Planner.NET for .NET Framework 2.0. Planner.NET databinding is database independent because it is performed through .NET datasets. However, because of the disconnected nature of these datasets, it is the user's responsibility to ensure the table keys are written consistently when the data from the dataset is transferred to the database.

Q: How can I save multiple appointments?

A: You can use the SaveTo method to save the schedule data to a file on the hard disk or to a stream in a binary or a XML format. Calling this method will save all schedule data, including appointments, contacts, tasks, resources, etc. Loading the data back can be done via the LoadFrom method. Here is a code that illustrates how to save the schedule data in a XML format to a file named 'd:\schedule.xml'. This code also assumes that the variable 'calendar' references an existing Calendar instance.

 calendar.Schedule.SaveTo("d:\schedule.xml", MindFusion.Scheduling.ContentType.Xml) 
 
As you have suggested, the method SaveToDataSource is used to serialize the schedule data to a database. In order to use it, you have to add a data source to your application, then assign this data source to the DataSource property of the Calendar control. You have to also assign the appropriate data members in the data source to the corresponding DataMember properties in the Calendar.

Q: How can I print a date range while the calendar is in single month view?

I would like to be able to print automatically all the months for a given start date and end date. Currently, I can only print the current month. I was able to create a routine that loops through a given date range and switches the calendar to each month, and then fires the Calendar.Print method. The only problem is that the print dialog pops up every time the month changes and the print method is fired.

A: Try using the void Print(PrintDocument doc) overloaded method. It won't display a dialog but just use the printer specified in doc.PrinterSettings. By default, that's the system default printer, but you can change it if you wish.

Q: I need to print a report with a structure similar to the Resource view. The days in a month are displayed in the rows, the contacts or resources in the columns, and in each cell are shown the appointments/items.

A: Use the Calendar.Print method instead of the Report class, and you will get the resource view printed exactly as you see it on the screen.

Q: In the MonthRange view, is there a way to display Monday as the first day and Sunday as the last day of the weeks?

A: You have to either specify a culture whose first day of the week is Monday through the Calendar.Culture property, or directly set the first day of the week through the Calendar.DateTimeFormat property as in the following sample code: Code: calendar.BeginInit(); calendar.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Monday; calendar.EndInit(); You can also perform this change at design-time through the property grid.

Copyright © 2001-2024 MindFusion LLC. All rights reserved.
Terms of Use - Contact Us