473,327 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

GridView-Update-Exception, Parse Error when german culture

Hello,
If I have a simple GridView which has in its data a decimal -type and the
page is German Culture the following happens:

I edit a row, click update-button in GridView, exception.
The exception is that the decimal ist for example 12, 15 instead 12.15

If I set to en-culture and have default point as separator and so do not use
for example 12,15 but only 12.15 all works fine.

Seems, that the Parse function when updating does not recognize the correct
NumberFormatInfo from the setted Culture.

Any help would be fine.

Thank you.
Rolf Welskes

Sep 18 '06 #1
5 2085
Hi Rolf,

I was able to reproduce this issue.

I also found some related bug report regarding ObjectDataSource:
http://connect.microsoft.com/VisualS...k.aspx?Feedbac
kID=105016

I'm currently confirming whether or not this is also an issue of
SqlDataSource and will get back to you as soon as possible. Thank you for
your patience and understanding.

Sincerely,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 19 '06 #2
Rolf,

you can use the free version of the CompatObjectDataSource to fix your
problem. It's a replacement of the ObjectDataSource with more features
and it does not have the culture bug. Take a look here:

http://www.manuelabadia.com/products/EODS_features.aspx

Regards,
Manuel Abadia

Rolf Welskes ha escrito:
Hello,
If I have a simple GridView which has in its data a decimal -type and the
page is German Culture the following happens:

I edit a row, click update-button in GridView, exception.
The exception is that the decimal ist for example 12, 15 instead 12.15

If I set to en-culture and have default point as separator and so do not use
for example 12,15 but only 12.15 all works fine.

Seems, that the Parse function when updating does not recognize the correct
NumberFormatInfo from the setted Culture.

Any help would be fine.

Thank you.
Rolf Welskes
Sep 19 '06 #3
Hi Rolf,

I'm afraid you'll have to use some workaround to deal with this issue for
now. You can handle GridView's RowUpdating event and convert the decimal
values back to string format using InvariantCulture:

protected void GridView1_RowUpdating(object sender,
GridViewUpdateEventArgs e)
{
for (int i = 0; i < e.NewValues.Count; i++) {
object obj = e.NewValues[i];
if (obj is string) {
double objValue;
if (double.TryParse(obj as string, out objValue)) {
e.NewValues[i] =
objValue.ToString(CultureInfo.InvariantCulture);
}
}
}
}

Sorry for the inconvenience of this issue. Please feel free to submit your
feedback at
http://connect.microsoft.com/Main/co...ContentID=2220.
Thanks for your understanding.

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 20 '06 #4
Hello,
thank you for your answer.
It helps in the moment.
I hope this will be realy solved in the next version, because cultureInfo
relevant formatting is fundamental for
the gridview on internet pages.

Thank You again.
Rolf Welskes
"Walter Wang [MSFT]" <wa****@online.microsoft.comschrieb im Newsbeitrag
news:SB**************@TK2MSFTNGXA01.phx.gbl...
Hi Rolf,

I'm afraid you'll have to use some workaround to deal with this issue for
now. You can handle GridView's RowUpdating event and convert the decimal
values back to string format using InvariantCulture:

protected void GridView1_RowUpdating(object sender,
GridViewUpdateEventArgs e)
{
for (int i = 0; i < e.NewValues.Count; i++) {
object obj = e.NewValues[i];
if (obj is string) {
double objValue;
if (double.TryParse(obj as string, out objValue)) {
e.NewValues[i] =
objValue.ToString(CultureInfo.InvariantCulture);
}
}
}
}

Sorry for the inconvenience of this issue. Please feel free to submit your
feedback at
http://connect.microsoft.com/Main/co...ContentID=2220.
Thanks for your understanding.

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.

Sep 28 '06 #5
Hi Rolf,

Thank you very much for your understanding. I have already reported this
issue to our product team; hopefully this will be addressed in next version.

Have a nice day!

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 29 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: theKirk | last post by:
using Visual Studio 2005 C# ASP.NET I know there has to be a simple way to do this....I want to use C# in a code behind for aspx. Populate a GridView from an xml file Add Fields to the...
1
by: ABC | last post by:
I have an idea. I need to write a common gridview block which contains labels, textboxs, one girdview and some buttons. Then, I think the above block will apply on several girdview with...
7
by: GaryDean | last post by:
I'm trying to load a GridView up with data manually, in code. I'm not using any datasource. Using this code.... ArrayList myRowArrayList; GridViewRow myGVR = new...
3
by: Jeff | last post by:
Hey asp.net 2.0 In the source I posted below, there is a GridView (look at the bottom of the script): <asp:GridView ID="gvwOnline" runat="server"> </asp:GridView> I'm trying to assign a...
4
by: =?Utf-8?B?Y2hyaXM=?= | last post by:
I have a perent gridview which includes in a template field a child gridview. Child gridview includes command buttons for opening different windows based on its row selected. I used the code...
0
by: sharonrao123 | last post by:
hello all, I have a parent gridview company and in this one a nested gridview people, Is it possible to allow the user to select one row or multiple rows from the people gridview using a check box...
1
by: webby98 | last post by:
I have an issues using LINQ and nested gridview. Let me explain, Gridview A are the for grouping. And Gridview B are place in between Gridview A to display list data relate to Gridview A...
6
by: RobertTheProgrammer | last post by:
Hi folks, Here's a weird problem... I have a nested GridView setup (i.e. a GridView within a GridView), and within the nested GridView I have a DropDownList item which has the...
5
by: Eric | last post by:
Hi, there are several gridviews all with a linkbutton which all trigger the same procedure. I need to know from which gridview the linkbutton has been clicked. Thanks Eric Here the code:
3
by: Peter | last post by:
I have a GridView which is populated by List<ofObjects> Does anyone have example of how to sort the columns of this GridView? I have found examples without DataSourceControl but these use...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.