iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi Guys,
I'm having problems with the WebGrid and culture en-GB. If I set the culture to custom and en-GB all the text is missing for menus etc. I assume the resource for en-GB hasn't been included in the dll. However my problem is when I want to save UK date formats for the ObjectDataSource update method. I really don't want to have to write something to parse all the values from the web grid myself.
I'm using my columns like this:
<ISWebGrid:WebGridColumn Caption="Valid To" DataMember="ValidTo" DataType="System.DateTime" Name="ValidTo" Width="100px" EditType="CalendarCombo" DataFormatString="dd/MM/yyyy"> </ISWebGrid:WebGridColumn>
The culture of my application is set to en-GB in the web.config as follows:
<globalization uiCulture="en-GB" culture="en-GB"/>
So when the grid renders I get 24/07/2011 for example. When I use the Calendar Combo to select the date I get the correct format again. However when I save the row (I'm using batch update) I get the following javascript error:
Message Title: Message from webpage
Message Text:
WebGrid failed to update 1 out of 1 changes due to errors. Please review and correct your changes.
The following records were not updated-Record " : Cannot convert value of parameter 'ValidTo' from 'System.String' to 'System.DateTime'"
Obviously if I use a date such as 01 Feb 2011 it saves but switches to 02 Jan 2011.
Thanks for any help
Paul
Hello Paul,
Ok, I can replicate the issue. It is not because the culture. I can also replicate the issue in default culture.It seems this the DataFormatString issue.For some missing text issue in en-GB culture, please refer into http://www.intersoftpt.com/Community/WebGrid/Localization/.
Some of list has not been filled. You can fill it manually regarding the previous thread.
Regards,Handy
Hi Handy,
Surely the culture specified in the grid would effect the date time parsing? I would expect to get an error for not being able to convert the date in the format of dd/MM/yyyy from a grid in US culture mode?
From the outside it appears as if there is a DateTime.Parse somewhere in the code that has got a hard coded US culture passed into it.
Thanks
As far I know, there should be no effect when using the culture. For temporary workaround, I suggest you to use WebInput. With WebInput, you can also customise Edit and Display format or event the masked format.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname