This is a migrated thread and some comments may be shown as answers.

[Solved] GridNumericColumn in Edit Mode don´t use current culture

3 Answers 256 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Juan Angel
Top achievements
Rank 1
Veteran
Juan Angel asked on 14 Apr 2008, 12:34 PM
    I have a RadGrid with GridNumericColumn. The culture of page is "es-ES" and collate of SQL Server Database is "Modern_Spanish_CI_AI".

    In Spain decimal separator is "," and group separator is ".". RadGrid use culture "es-ES" in ViewMode, but in edit mode I belive that it use default culture.

    For example, in database i have stored the value "0,22" (this value is < 1 and >0, zero comma twenty two) (Sql server datatype => float, equivalent to double in .NET framework). Now:
  • In ViewMode: appear "0,22" (zero comma twenty two), but
  • In EditMode: appear "22" (twenty two)
Note: RadGrid use a SqlDataSource standard.

<telerik:GridNumericColumnEditor ID="GridNumericColumnEditor1" runat="server">   
            <NumericTextBox runat="server"
                <NumberFormat DecimalSeparator="," GroupSeparator="." />  
            </NumericTextBox>  
        </telerik:GridNumericColumnEditor>  
         
       <telerik:RadGrid ID="RadGrid1"  DataSourceID="SqlDataSource1" AllowMultiRowSelection="True" AllowMultiRowEdit="True" 
        Skin="Web20" runat="server" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" 
        Width="99%" AllowAutomaticUpdates="True" AllowPaging="True" AutoGenerateColumns="False" GridLines="None" OnItemDataBound="RadGrid1_ItemDataBound" > 
            <PagerStyle Mode="Slider" /> 
               
                <ClientSettings> 
                    <Selecting AllowRowSelect="True" /> 
                    <ClientMessages PagerTooltipFormatString="P&#225;gina: &lt;b&gt;{0}&lt;/b&gt; de &lt;b&gt;{1}&lt;/b&gt;" /> 
                </ClientSettings> 
            <MasterTableView CommandItemDisplay="Top" DataKeyNames="ID_MATERIAL" DataSourceID="SqlDataSource1" EditMode="InPlace"
                <ExpandCollapseColumn Resizable="False" Visible="False"
                    <HeaderStyle Width="20px" /> 
                </ExpandCollapseColumn> 
                <RowIndicatorColumn Visible="False"
                    <HeaderStyle Width="20px" /> 
                </RowIndicatorColumn> 
                <Columns> 
                    .... 
 
                    <telerik:GridNumericColumn DataType="System.Double" ColumnEditorID="GridNumericColumnEditor1" NumericType="Number" DataField="NUM_CONDUCTIVIDAD" HeaderText="Conductividad" 
                        SortExpression="NUM_CONDUCTIVIDAD" UniqueName="NUM_CONDUCTIVIDAD" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="10%" > 
                    </telerik:GridNumericColumn> 
...... 
 
 
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" EditText="Editar" InsertText="Insertar" UpdateText="Actualizar"
                        <HeaderStyle Width="25px" /> 
                    </telerik:GridEditCommandColumn> 
                    <telerik:GridClientDeleteColumn ConfirmText="&#191;Est&#225; seguro?" ButtonType="ImageButton" ImageUrl="~/img/Grid/Delete.gif" Text="Delete" UniqueName="column"
                        <HeaderStyle Width="25px" /> 
                    </telerik:GridClientDeleteColumn> 
                </Columns> 
             
                <EditFormSettings ColumnNumber="2" CaptionDataField="DSC_MATERIAL" CaptionFormatString="Editando &lt;strong&gt;{0}&lt;/strong&gt;"
                    <FormTableItemStyle Wrap="False"></FormTableItemStyle> 
                    <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle> 
                    <FormMainTableStyle GridLines="Horizontal" CellSpacing="0" CellPadding="3" BackColor="White" Width="100%" /> 
                    <FormTableStyle CellSpacing="0" CellPadding="2" CssClass="module" BackColor="White" /> 
                    <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle> 
                    <EditColumn ButtonType="ImageButton" 
                        UpdateImageUrl="~\Img\Grid\Update.gif" EditImageUrl="~\Img\Grid\Edit.gif" 
                        InsertImageUrl="~\Img\Grid\Insert.gif" CancelImageUrl="~\Img\Grid\Cancel.gif" 
                        InsertText="Insertar" UpdateText="Actualizar" UniqueName="EditCommandColumn1" CancelText="Cancelar"
                    </EditColumn> 
                    <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle> 
                    <PopUpSettings ScrollBars="None" /> 
                </EditFormSettings> 
             
            </MasterTableView> 
           <FilterItemStyle BackColor="Gainsboro" /> 
                         
        </telerik:RadGrid> 
 
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:LabLATConnectionString %>" 
        DeleteCommand="DELETE FROM [MATERIAL] WHERE [ID_MATERIAL] = @original_ID_MATERIAL" 
        InsertCommand="INSERT INTO [MATERIAL] ([DSC_MATERIAL], [NUM_CONDUCTIVIDAD], [BOL_ACTIVO], [DSC_USR_UPD], [DAT_UPD]) VALUES (@DSC_MATERIAL, @NUM_CONDUCTIVIDAD, @BOL_ACTIVO, @DSC_USR_UPD, @DAT_UPD)" 
        OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT [ID_MATERIAL], [DSC_MATERIAL], [NUM_CONDUCTIVIDAD], [BOL_ACTIVO], [DSC_USR_UPD], [DAT_UPD] FROM [MATERIAL]" 
        UpdateCommand="UPDATE [MATERIAL] SET [DSC_MATERIAL] = @DSC_MATERIAL, [NUM_CONDUCTIVIDAD] = @NUM_CONDUCTIVIDAD, [BOL_ACTIVO] = @BOL_ACTIVO, [DSC_USR_UPD] = @DSC_USR_UPD, [DAT_UPD] = @DAT_UPD WHERE [ID_MATERIAL] = @original_ID_MATERIAL"
        <DeleteParameters> 
            <asp:Parameter Name="original_ID_MATERIAL" Type="Int32" /> 
        </DeleteParameters> 
        <UpdateParameters> 
            <asp:Parameter Name="DSC_MATERIAL"      Type="String" /> 
            <asp:Parameter Name="NUM_CONDUCTIVIDAD" Type="Double"/> 
            <asp:Parameter Name="BOL_ACTIVO"        Type="Boolean" /> 
            <asp:Parameter Name="DSC_USR_UPD"       Type="String"  /> 
            <asp:Parameter Name="DAT_UPD"           Type="DateTime" /> 
            <asp:Parameter Name="original_ID_MATERIAL" Type="Int32"  /> 
        </UpdateParameters> 
        <InsertParameters> 
            <asp:Parameter Name="DSC_MATERIAL" Type="String" DefaultValue="" /> 
            <asp:Parameter Name="NUM_CONDUCTIVIDAD" Type="Double" /> 
            <asp:Parameter Name="BOL_ACTIVO" Type="Boolean" /> 
            <asp:Parameter Name="DSC_USR_UPD" Type="String"  /> 
            <asp:Parameter Name="DAT_UPD" Type="DateTime"  /> 
        </InsertParameters> 
    </asp:SqlDataSource> 

3 Answers, 1 is accepted

Sort by
0
Missing User
answered on 15 Apr 2008, 10:56 AM
Hi Juan,

Thanks for the feedback. We have addressed this problem already and the fix will be available in the Q1 2008 release expected tomorrow.

I have added Telerik points to your account for that report.


Best wishes,
Plamen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Kavitha
Top achievements
Rank 1
answered on 22 Feb 2013, 03:00 PM
Hello,
Is this problem solved?
I am using the latest version of Telerik. It seems it is not corrected.
I want my application to work in french culture.
In view mode, it is well dsiplayed as 1,234 but in edit mode it displays 1234,000.
In english culture, it works well.
0
Eyup
Telerik team
answered on 27 Feb 2013, 01:28 PM
Hello Kavitha,

I have already replied to your query in the following forum thread:
http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid---gridnumericcolumneditor---format-problem.aspx

I suggest that we continue our conversation on the mentioned thread to enable other users with similar issues to track  the discussion more easily. In addition, please note that avoiding multiple threads with similar issues will enable us to respond more quickly and efficiently to your posts.

Greetings,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Juan Angel
Top achievements
Rank 1
Veteran
Answers by
Missing User
Kavitha
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or