Hello,
It's installed "RadControls for ASP.NET AJAX Q2 2009 SP1" and "Microsoft ASP.NET 2.0 AJAX Extensions v1.0.61025" on my computer. When I run Live Examples -> Scheduler -> Populating With Data -> XML Provider, double click an appointment, set a "Daily Recurrence Rule" for it and press Save, I got an JavaScript alert telling that "Object reference not set to an instance of an object.". There is no problem with other type of recurrence rules (Hourly, Weekly, Monthly and Yearly). I also tried other examples (e.g. Database Provider), and I had the same problem with them also saving with a daily recurrence rule.
Could anyone please help me solving this problem?
Thank you,
Afsar.
5 Answers, 1 is accepted
The following is the detailed error information when I debug the page.
Server Error in '/Live Demos' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
|
Stack Trace:
|
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082
I think I found the problem. My "regional settings" is set to Turkish. And I think rad library converts recurrence types from lower case to upper case. When I select daily recurrence, it converts it from "daily" to "DAİLY" (where in English regional settings, it is supposed to be "DAILY"). Then I think this causes the problem.
Does anyone have any suggestions to solve this problem?
Thank you for reporting the issue and finding the actual cause. We're a bit ashamed that we've fallen for the classic Turkish I problem. We'll fix this right away and the fix will be available in the next internal build.
As a token of our gratitude for your involvement, your Telerik points have been updated.
Regards,
Tsvetomir Tsonev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Hello Tsvetomir,
Thank you for your interest and the points you gave to me. But I had to continue my project and at last, I found my own solution. Those who have the same issue can refer to this.
A revision of Scheduler's FirstLook example : http://www.zumodrive.com/share/3UZeYzA4OT
A sample screen-shot is attached.
The followings are the steps to prevent this problem.
1. The page must have English culture.
At the top of the page the culture can be set as : <%@ Page Culture="en-US" UICulture="tr-TR"
Note that the UICulture property can be set to Turkish culture. But the Culture property has to be set to English culture.
2. At the Page_Init event the culture property of calenders, schedulers, etc. must be set to Turkish culture.
For example,
RadCalendar1.CultureInfo = getTRCulture();
RadCalendar2.CultureInfo = getTRCulture();
RadScheduler1.Culture = getTRCulture();
Where getTRCulture() is
private CultureInfo getTRCulture()
{
return CultureInfo.GetCultureInfo("tr-TR");
}
3. While coding, programmer can prefer to code according to Turkish culture instead of English culture. He might prefer to write DateTime.Parse("31.12.2009") instead of DateTime.Parse("12/31/2009"). To do that the culture setting must be changed to Turkish at the beginning of the code and it must be changed to English again at the end of the code.
For example,
try
{
setThreadCultreTR();
DateTime dtSelectedDate = DateTime.Parse("31.12.2009"); //instead of "12/31/2009"
RadScheduler1.SelectedDate = dtSelectedDate;
RadCalendar1.SelectedDate = dtSelectedDate;
}
catch (Exception ex)
{
}
finally
{
setThreadCultreEN();
}
Where setThreadCultreTR() and setThreadCultreEN() are
private void setThreadCultreTR()
{
Thread.CurrentThread.CurrentCulture = getTRCulture();
}
private void setThreadCultreEN()
{
Thread.CurrentThread.CurrentCulture = getENCulture();
}
And where getENCulture() is
private CultureInfo getENCulture()
{
return CultureInfo.GetCultureInfo("en-US");
}
Thank you for sharing the workaround you have found. I'm glad you'll be able to continue working while we fix the problem.
Regards,
Dimitar Milushev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.