xmlns:sys="clr-namespace:System;assembly=mscorlib"

如只显示日期的时间部分

dev gridcontrol 绑定int型及日期型的列默认当值为0时显示空白及格式化日期显示方式-LMLPHP

<dxg:GridColumn Header="测试" FieldName="整型">
                    <dxg:GridColumn.EditSettings>
                        <dxe:TextEditSettings>
                            <dxe:TextEditSettings.NullValue>
                                <sys:Int32>0</sys:Int32>
                            </dxe:TextEditSettings.NullValue>
                        </dxe:TextEditSettings>
                    </dxg:GridColumn.EditSettings>
                </dxg:GridColumn>

<dxg:GridColumn Header="日期" FieldName="rDate">
                    <dxg:GridColumn.EditSettings>
                        <dxe:DateEditSettings NullValue="{x:Static sys:DateTime.MinValue}" DisplayFormat="HH:mm:ss"/>
                    </dxg:GridColumn.EditSettings>
                </dxg:GridColumn>

这样日期型就会默认显示为空字符 而不会显示默认的时间

04-20 21:29