标签:参考 datagrid ref box str com ica tin get
参考:Format values in a Datagrid
参考:Remove stringFormat while editing cell in datagrid
使用 DataGridTemplateColumn 实现:
<DataGridTemplateColumn Header="Coût (k€)"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding Path=TechnicalCostAmount, Mode=OneWay, StringFormat=N0, ConverterCulture=fr-FR}"/> </DataTemplate> </DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellEditingTemplate> <DataTemplate> <TextBox Text="{Binding Path=TechnicalCostAmount, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/> </DataTemplate> </DataGridTemplateColumn.CellEditingTemplate> </DataGridTemplateColumn>
wpf: DataGridTextColumn 数字格式显示,编辑时取消格式(StringFormat)
标签:参考 datagrid ref box str com ica tin get
原文地址:https://www.cnblogs.com/Mindy-hym/p/11436299.html