User Profile & Activity

Frank P Member
Page
of 8

So, if I am using a grid with 6 different columns containing decimal types (currency), I need to write this code to handle culture settings?

Also, when I "click-into" the cell to make an edit, then leave the cell without entering a change, the value is "null" - not the value that was originally in the cell. Why?

I have a need to change the culture sometimes.

In my example, if I change a value to "19,32", the grid changes it to "0". The javascript sees the value as "1932". How do I get this to work for an alternative culture? I still want the value to be saved to the database as "19.32".

Thanks.

Posted: May 23, 2012 9:39 AM

Try this one (I removed the old to avoid any confusion).

You will need to add your own northwind.mdf file in the app_data folder.

Posted: May 22, 2012 3:08 PM

When I use  a web service for the update, the value entered in the grid is sent to the service as "12,44" when I expect a value of "12.44". The behavior is not correct.

Please see the attached example and solve these issues:

  1. Updating does not occur when a change is made to "UnitPrice". An error is returned from the IS javascript.
  2. Using the cultureinfo does not work in edit mode.
  3. Verify the value passed to the "SaveOrderDetails" method contains a string value, not a numeric value.
  4. Verify the value passed to the "SaveOrderDetails" method contains an invalid value when cultureinfo is modified. (12,44 instead of 12.44)

Thank you.

 

Posted: May 21, 2012 3:16 PM

Christian,

I am having a similar issue when attempting to set the cutltureinfo on the webinput control. Was this issue ever resolved for you?

 

Thank you.

This is still not working correctly. I've downloaded the latest available framework and webgrid.

Any ideas on when this might be fixed?

Posted: May 16, 2012 1:56 PM

OK, so finally getting around to testing this fully.

It seems to work for display and edit, but when I enter "12", then click "Accept All Changes", the grid is refreshed with "£1.200,00" in the cell I just updated.

When I enter "1,4", then click "Accept All Changes", the grid is refreshed with "£140,00" in the cell I just updated.

When I enter "12.999,45", then click "Accept All Changes", the grid is refreshed with "£1.299.945,00" in the cell I just updated.

This is not the expected behaviour in any example.

When I review the properties for WebGrid1 after assignment in "WebGrid1_OnAfterResponseProcess", the properties for  WebGrid1.CultureInfo.NumberFormatInfo.Decimal do not appear to be set correctly (see attached).

I didn't ask for you to find the issue or replicate it. I just want to know if there is a way to "resume next" when your code breaks - it happens a lot and I want a way around the issues.

For now, I've removed the WebInput control.

 

 

I will have a release scheduled on 4/26. If your code is released on 4/23, I will delay my release by up to two weeks to give time for testing the IS fix.

If you will not have the fix, I will release as scheduled - without the fix - and hope it makes it into your next release.

Checking on this fix - is it still scheduled to be in the 23 April release?

I have a release that may be delayed if this will be complete.

All times are GMT -5. The time now is 12:39 AM.
Previous Next