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
40
Editing datetime cell saves a wrong value in the grid...
posted

Hi.

I have a webdatagrid that is binding to a dataset. When I edit a datetime cell in my webdatagrid, It stores this value substracting 2 hours from the time I have entered. For example. if I enter 7/24/2011 09:00, the webdatagrid changes this value to 7/24/2011 07:00.

Here is my webdatagrid code:

 

<

ig:WebDataGrid ID="wdgLoadingUnloadingDetails"

 

 

 

runat="server"

 

 

 

Width="100%"

 

 

 

 

AutoGenerateColumns="false" EnableAjax="true" EnableAjaxViewState="true"

 

 

 

 

EnableViewState="true" EnableDataViewState

="true" EnableEmbeddedJavaScript="true" DataKeyFields="RegID"

 

 

 

OnRowUpdating="wdgLoadingUnloadingDetails_RowUpdating">

 

 

 

<EditorProviders>

 

 

 

<ig:DatePickerProvider ID="wdgLoadingUnloadingDetails_DateInputProvider">

 

 

 

<EditorControl ID="wdgLoadingUnloadingDetails_ec_DateInputProvider"

 

 

 

DropDownCalendarID="webMonthCalendar" runat="server" OpenCalendarOnFocus

="true">

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

</EditorControl>

 

 

 

</ig:DatePickerProvider>

 

 

 

</EditorProviders>

 

 

 

<Columns>

 

 

 

<ig:BoundDataField DataFieldName="RegID" Key="RegID" Hidden="true"></ig:BoundDataField>

 

 

 

<ig:BoundDataField Width="140px" DataFieldName="LocationName" Key="LocationName" Header-Text="<%$ Resources:AssignTransportData, Place %>"></ig:BoundDataField>

 

 

 

<ig:BoundDataField Width="100%" DataFieldName="StreetName" Key="StreetName" Header-Text="<%$ Resources:AssignTransportData, Address %>"></ig:BoundDataField>

 

 

 

<ig:BoundDataField Width="140px" DataFieldName="City" Key="City" Header-Text="<%$ Resources:AssignTransportData, City %>"></ig:BoundDataField>

 

 

 

<ig:BoundDataField Width="30px" DataFieldName="PostalCode" Key="PostalCode" Header-Text="<%$ Resources:AssignTransportData, PostalCode %>"></ig:BoundDataField>

 

 

 

<ig:BoundDataField Width="60px" DataFieldName="Reference" Key="Reference" Header-Text="<%$ Resources:AssignTransportData, Reference %>"></ig:BoundDataField>

 

 

 

<ig:BoundDataField Width="86px" DataType="System.DateTime" DataFormatString="<%$ Resources:AssignTransportData, DataFormatString %>" DataFieldName="ProposedByContractingCompany" Key="ProposedByContractingCompany" Header-Text="<%$ Resources:AssignTransportData, RequestedDate %>"></ig:BoundDataField>

 

 

 

<ig:BoundDataField Width="86px" CssClass="Editable" DataType="System.DateTime" DataFormatString="<%$ Resources:AssignTransportData, DataFormatString %>" DataFieldName="Actual" Key="Actual" Header-Text="<%$ Resources:AssignTransportData, RealDate %>"></ig:BoundDataField>

 

 

 

</Columns>

 

 

 

<Behaviors>

 

 

 

<ig:EditingCore AutoCRUD="true">

 

 

 

<Behaviors>

 

 

 

<ig:CellEditing EditModeActions-EnableF2="true" EditModeActions-EnableOnKeyPress="true" EditModeActions-MouseClick="Single" EditModeActions-EnableOnActive="true">

 

 

 

<ColumnSettings>

 

 

 

<ig:EditingColumnSetting ColumnKey="RegID" ReadOnly="true" />

 

 

 

<ig:EditingColumnSetting ColumnKey="LocationName" ReadOnly="true" />

 

 

 

<ig:EditingColumnSetting ColumnKey="StreetName" ReadOnly="true" />

 

 

 

<ig:EditingColumnSetting ColumnKey="City" ReadOnly="true" />

 

 

 

<ig:EditingColumnSetting ColumnKey="PostalCode" ReadOnly="true" />

 

 

 

<ig:EditingColumnSetting ColumnKey="Reference" ReadOnly="true" />

 

 

 

<ig:EditingColumnSetting ColumnKey="ProposedByContractingCompany" ReadOnly="true" />

 

 

 

<ig:EditingColumnSetting ColumnKey="Actual" ReadOnly="false" EditorID="wdgLoadingUnloadingDetails_DateInputProvider" />

 

 

 

</ColumnSettings>

 

 

 

</ig:CellEditing>

 

 

 

</Behaviors>

 

 

 

</ig:EditingCore>

 

 

 

</Behaviors>

</ig:WebDataGrid>

Can you help me, please? Thanks.