WPF DataGridTextColum 显示时间格式化

2021-02-13 02:17

阅读:536

标签:add   head   room   string   tco   gpo   sre   进入   ext   

 1 DataGrid Name="DGVisit" Grid.Row="2" AutoGenerateColumns="False" CanUserAddRows="False" IsReadOnly="True" >
 2                         DataGrid.Columns>
 3                             DataGridTextColumn Header="" Binding="{Binding Id}" MinWidth="110"/>
 4                             DataGridTextColumn Header="房间号" Binding="{Binding VisitRoomNum}" MinWidth="250"/>
 5                             DataGridTextColumn Header="房间类型" Binding="{Binding VisitRoom}" MinWidth="300"/>
 6                             DataGridTextColumn Header="访问人员" Binding="{Binding VisitorName}" MinWidth="400"/>
 7                             DataGridTextColumn Header="进入房间时间" Binding="{Binding Path=CreateTime,StringFormat=‘yyyy年MM月dd日 HH:mm:ss‘}" MinWidth="300" />
 8                             DataGridTextColumn Header="离开房间时间" MinWidth="300"/>
 9                         DataGrid.Columns>
10                     DataGrid>

 

WPF DataGridTextColum 显示时间格式化

标签:add   head   room   string   tco   gpo   sre   进入   ext   

原文地址:https://www.cnblogs.com/dotnetHui/p/8464834.html


评论


亲,登录后才可以留言!