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

GridView culture language on editmode

1 Answer 85 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mattia
Top achievements
Rank 2
Mattia asked on 13 Jul 2015, 09:56 AM

Hi,

I'm trying to change the culture number format as italian format on my gridview and keep the english language.

If I copy and paste number without enter on edit mode, the cell is keeping the right format (for example 33.000,58)

Otherwise if I'm entering on edit mode the cell lost the number format

 

I uploaded the demo on support ticket

Thank you

 

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 14 Jul 2015, 08:39 AM
Hello,

Thank you for attaching a demo project in the support ticket.

As to losing number format in edit mode, I would suggest you to try defining CellEditTemplate like so:
<telerik:GridViewDataColumn  DataMemberBinding="{Binding Path=Value2}"DataFormatString="{}{0:N4}" Header="STRING FORMAT N4">
    <telerik:GridViewDataColumn.CellEditTemplate>
            <DataTemplate>
                    <TextBox Text="{Binding Value2, StringFormat=N4}" />
            </DataTemplate>
    </telerik:GridViewDataColumn.CellEditTemplate>
 </telerik:GridViewDataColumn>

As a side note, we noticed you have set both this.Language and 
myGrid.IsLocalizationLanguageRespected = false; 

Please keep in mind you should configure one or the other since those settings contradict with one another.

Regards,
Dimitrina
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
GridView
Asked by
Mattia
Top achievements
Rank 2
Answers by
Dimitrina
Telerik team
Share this question
or