将SampleData列更改为double而不是int

时间:2017-02-18 18:15:35

标签: c# visual-studio xaml datagrid blend

解决:

解决方案是编辑XAML中的下一行:

<DataGridTextColumn Binding="{Binding Exp,StringFormat ={}{0:n3}}" Header="data"/>

我在混合中创建了一个DataGrid。 DataGrid将包含很少的列,其中一列将是image,其中一列是数字。

但是,绑定数据时,选项如下:

enter image description here

现在,当我尝试编辑列数据和版本号如150.5时,我收到错误,因为它本来是int。

有没有办法改变它,所以它会接受双重类型?

谢谢你。

0 个答案:

没有答案