Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
70
WebDateChooser and format cell
posted

Hello,

Sorry for my poor english...

I use a webdatechooser for editing a column in my webgrid.

This is the HTML code for this column :
<igtbl:UltraGridColumn AllowUpdate="Yes" BaseColumnName="DATEPEREMP" DataType="System.DateTime"
    EditorControlID="txtDatePeremp" Format="dd/MM/yyyy" Key="DATE_PEREMP" Type="Custom"
    Width="25%">
    <Header Caption="Date de p&#233;remption">
        <RowLayoutColumnInfo OriginX="2" />
    </Header>
    <Footer>
        <RowLayoutColumnInfo OriginX="2" />
    </Footer>
</igtbl:UltraGridColumn>

When I choose a date, the date is displayed in the correct format (dd/MM/yyyy).

The problem appears when a postback is fired.

After the post back, the date is displayed is this format (M/dd/yyyy HH:mm:ss tt) Exemple : 2/17/2008 12:00:00 AM

In my code behind, the property 'Value' and 'Text' have this value too.
If I don't change the date in my row, these properties have the good formatted date.

I looked for in the javascript object and I saw that the property 'value' and 'text' has the wrong formatted date but the property 'MaskedValue' has the right formatted date.

How can I get the correct format in my code-behind?

The version of Infragistics is : 8.1.20081.1000

 Thanks in advance

Parents
No Data
Reply
  • 459
    posted

    try adding this code in web.config between the system.web-tags:

    <globalization culture="nl-BE" uiCulture="nl-BE" requestEncoding="utf-8" responseEncoding="utf-8" />

     

    you can find the culture you need for your country on the internet
Children