Home Unanswered Active Tags New Question

How to change the <globalization> to en-gb

I changed the globalization culture to united kingdom in order for the weekends to be on the right and the date come before the month. The only piece of code i changed was the piece below.

<globalization uiCulture="en-gb" culture="en-gb"/>

When i run the program and try to book a holiday,i get an arithmitic overflow error. Any ideas how to make this work ??

Asked by Drizzim 1 year ago.
Replies
protected void EventDetail_ItemUpdating(object sender, DetailsViewUpdateEventArgs e)
{
e.NewValues["eventstart"] = Convert.ToDateTime(e.NewValues["eventstart"], new CultureInfo("en-GB"));
e.NewValues["eventend"] = Convert.ToDateTime(e.NewValues["eventend"], new CultureInfo("en-GB"));
}

Are you telling that did this not do the trick??
Comment posted by Bbq 1 year ago.

The 3 pieces of code tht influence this are the following:

Web.config file -- <globalization uiCulture="en-GB" culture="en-GB"/>

Default.aspx.cs --

protected void EventDetail_ItemUpdating(object sender, DetailsViewUpdateEventArgs e)
{
e.NewValues["eventstart"] = Convert.ToDateTime(e.NewValues["eventstart"], new CultureInfo("en-GB"));
e.NewValues["eventend"] = Convert.ToDateTime(e.NewValues["eventend"], new CultureInfo("en-GB"));
}

Default.aspx --

<asp:DetailsView ID="EventDetail" runat="server" DefaultMode="Edit" OnItemUpdated="EventDetail_ItemUpdated"
DataSourceID="SqlDataSourceDetail" DataKeyNames="id"
AutoGenerateEditButton="True" OnItemCommand="EventDetail_ItemCommand"
Width="50px" AutoGenerateInsertButton="True" AutoGenerateRows="False" OnItemInserted="EventDetail_ItemInserted"
CssClass="detail" GridLines="None" OnItemUpdating="EventDetail_ItemUpdating">

The error i get is when i try and book an event is -- arithmitic overflow error converting expression to data type datetime.

Comment posted by Anonymous 1 year ago.
Hmm...I'm kind of out of answer right now...maybe you should contact support at their email. :S

Bbq
Comment posted by Bbq 1 year ago.

I still cannot figure out what I am doing wrong...

Is there any namespaces i need to include ??

Using ...;

Comment posted by Anonymous 1 year ago.
I found this website : http://msdn.microsoft.com/en-us/library/3xbc3357(VS.90).aspx
Maybe you indeed need a namespace for globalisation...I am really not sure at that point.
Let me know if something new comes up.

Bbq
Comment posted by Anonymous 1 year ago.

my problem has something to do with the item_updating event or the modalpopup extender. When i run the application it shows the weekends as the last 2 days and monday as the first day. My problem is when i try and book a room it goes to a grey screen and shows a white box.

Comment posted by drizzim 1 year ago.
That's weird...maybe send a screenshot along with a further detailed explanation of the problem to support@daypilot.org will help.

Bbq
Comment posted by Bbq 1 year ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java