Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Grid > Radnumeric inside edit template issue

Not answered Radnumeric inside edit template issue

Feed from this thread
  • Posted on Feb 15, 2012 (permalink)

    I have a issue in this radgrid in particular at templated column with radnumericbox inside the edittemplate, currency type and culture pt-br

    The value in database is 10.00

    The label in template of related column shows R$ 10,00 (it's ok).

    When i enter in edit mode the radnumerictextbox shows R$ 1000,00 unselected and shows 1000 when got focus,  seems  it does not interprets the decimal point even when i force the numberformat properties. <NumberFormat GroupSeparator="." DecimalSeparator="," />

    Did i missed something?

    Gilberto
     
     <telerik:RadGrid ID="RadGridAnuidades" ValidationSettings-ValidationGroup="grid"
                                        runat="server" OnDataBound="RadGridAnuidades_DataBound" CellSpacing="0" GridLines="None"
                                        AllowAutomaticUpdates="True" DataSourceID="SqlDataSourceUpdateAnuidades" OnNeedDataSource="RadGridAnuidades_NeedDataSource">
                                        <ValidationSettings ValidationGroup="grid"></ValidationSettings>
                                        <MasterTableView AutoGenerateColumns="False" DataKeyNames="CódigoSócio,Ano" EditMode="InPlace"
                                            DataSourceID="SqlDataSourceUpdateAnuidades">
                                            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                                            <Columns>
                                                <telerik:GridBoundColumn DataField="CódigoSócio" Visible="false" DataType="System.Int32"
                                                    FilterControlAltText="Filter CódigoSócio column" HeaderText="CódigoSócio" ReadOnly="True"
                                                    SortExpression="CódigoSócio" UniqueName="CódigoSócio">
                                                </telerik:GridBoundColumn>
                                               
                                                <telerik:GridTemplateColumn DataField="Valor" DataType="System.Decimal" FilterControlAltText="Filter Valor column"
                                                    HeaderText="Valor" SortExpression="Valor" UniqueName="Valor">
                                                    <EditItemTemplate>
                                                        <telerik:RadNumericTextBox ID="RadNumericTextBoxValor" runat="server" Type="Currency"
                                                            Culture="pt-BR" Text='<%# Bind("Valor") %>'>
                                                            <NumberFormat GroupSeparator="." DecimalSeparator="," />
                                                        </telerik:RadNumericTextBox>
                                                        <asp:RequiredFieldValidator ValidationGroup="grid" ID="requiredfieldvalidatorValor"
                                                            runat="server" ControlToValidate="RadNumericTextBoxValor" CssClass="failureNotification"
                                                            ErrorMessage=" *">
                                                        </asp:RequiredFieldValidator>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="ValorLabel" runat="server" Text='<%# Bind("Valor", "{0:C2}") %>'></asp:Label>
                                                    </ItemTemplate>
                                                </telerik:GridTemplateColumn>
                                                <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                                                    <ItemStyle CssClass="MyImageButton" />
                                                </telerik:GridEditCommandColumn>
                                               
                                            </Columns>
                                         
                                        </MasterTableView>
                                        
                                    </telerik:RadGrid>

    Reply

  • Posted on Feb 16, 2012 (permalink)

    Hello Gilberto,

    Try setting KeepTrailingZerosOnFocus as true for the RadNumericTextBox.

    -Shinu.

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.
  • Posted on Feb 16, 2012 (permalink)

    Thanks Shinu

    Unfortunately, does not works.

    Reply

  • Posted on Feb 17, 2012 (permalink)

    Usually we have decimal 18,2 to currency fields in database, but thats the trick i changed to float type in database and everyhing works fine now.

    We should have some warnings in documentation.

    Thanks

    Reply

  • Posted on Feb 22, 2012 (permalink)

    well, after i changed the database field type, edit works but insert no.

    Could someone from telerik elaborate some more about this issue? It seems to be very easy but its driving me crazy.

    Please Help

    Gilberto

    Reply

  • Posted on Feb 23, 2012 (permalink)

    Actually everything works if you bound to a DbValue property.

    Thanks

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Grid > Radnumeric inside edit template issue
Related resources for "Radnumeric inside edit template issue"

ASP.NET Grid Features  |  Documentation  |  Demos  |  Step-by-step Tutorial  ]