We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Localization support

Thread ID:

Created:

Updated:

Platform:

Replies:

72869 Apr 9,2008 07:31 AM Apr 9,2008 08:43 AM Windows Forms 2
loading
Tags: ScheduleControl
Sumeda
Asked On April 9, 2008 07:31 AM

Hi! All,

I want to use the Schedule control with Arabic cultures. I try to run by setting "ar-SA" as current thread UICulture. But I'm getting following error messages

"{"The added or subtracted value results in an un-representable DateTime. Parameter name: months"}"

When I check further I found that the following exception has occurred within the navigation calendar in schedule control.

"
TopLeftDate = 'scheduleControlweekOrMonthView.Calendar.TopLeftDate' threw an exception of type 'System.InvalidCastException'
"

I'm using custom data provider bases on the "ScheduleDataProvider".

But Arabic culture settings are working fine with Schedule example installed with Syscfusion installation.

So can somebody give me sample code or instructions on what do I need to fix in the data provider to support Arabic cultures.

- Thanks in advance





Administrator [Syncfusion]
Replied On April 9, 2008 08:30 AM

A couple of comments.

1) Make sure you are explicitly setting

this.scheduleControl1.Culture = Application.CurrentCulture;

so that the schedulecontrol is forced to used the local settings.

2) You did not mentioned what technology you are using to serialize the data in your custom data provider. Some technologies expect dates to use invariant cultures, so make sure you are passing actual DateTime objects to be serialized instead of numerical values for years/months/days. Year values in ar-SA will trigger exceptions if a dataprovider is expecting them to be invariant years.

As you say, ar-SA seems to be working OK in the samples we ship. If you can provide a sample project showing the exception you are seeing (either here or through Direct Trac), we can try to debug it to see what might be failing.

There are changes in the 6.2.0.32 release (release candidate available now) that make RTL work better in Schedule, so you might try that version. But I do not think that version will affect this problem you are seeing but I may be wrong.


Administrator [Syncfusion]
Replied On April 9, 2008 08:43 AM

One other comment on custom schedule dataproviders. The ScheduleCOntrol expects the lists of appointments to be ordered in a special way. The primary sort order is determined by startdate, but there need to be 2 secondary sort orders such that AllDay appointments on a particular date appear before any non-allday appointments, and if 2 non-allday appointments start at the same time for a given day, the longer appointment appears first in the list. If you are basing your custom schedule provider off the MDB samples posted earlier here, those sample DO NOT provide the ordering.

Here is another sample. This sample has some corrections to the MDB_ScheduleDataProvider.cs code from the previous versions that were posted in the forums. In particular, MDB_ScheduleDataProvider.GetSchedule has been tweaked to make sure the appointments are sorted in a particular manner which is a requirement of the underlying schedule code. The appointments lists must be ordered by startdate with the AllDay appointments appearing first in date order. In addition, if an two appointment starts at the same time, the longer appointment appears before the shorter one.



CS_MDB_DerivedAppointmentsDLG.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;