码迷,mamicode.com
首页 > 其他好文 > 详细

WPF中数据绑定问题

时间:2014-07-16 23:15:43      阅读:148      评论:0      收藏:0      [点我收藏+]

标签:数据   width   问题   re   c   line   

  在数据库中字段不区分大小写,可以页面是区分的,一开始以为不区分,可我从数据库查出了数据在前台就是不显示想了半天才发现的。

 

 

<sdk:DataGrid FrozenColumnCount ="1" Margin="0,0,0,0" Name="dgList" AutoGenerateColumns="False" IsReadOnly="True"  GridLinesVisibility="All"  ClipboardCopyMode="IncludeHeader"  SelectedIndex="0" LoadingRow="dgList_LoadingRow" CopyingRowClipboardContent="dgList_CopyingRowClipboardContent">
                <sdk:DataGrid.Columns>
                    <sdk:DataGridTemplateColumn  Header="序号" Width="55" IsReadOnly="True" ClipboardContentBinding="{Binding Path=HHYT___SN}" CanUserReorder="False" CanUserResize="False" CanUserSort="False">
                        <sdk:DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <sdk:Label Content="序号" HorizontalAlignment="Center" IsEnabled="False" />
                            </DataTemplate>
                        </sdk:DataGridTemplateColumn.CellTemplate>
                    </sdk:DataGridTemplateColumn>
                    <sdk:DataGridTextColumn Header="项目编码" Width="Auto" Binding="{Binding Path=PROJECT_CODE}" CanUserReorder="True" CanUserResize="True" CanUserSort="True"  />
                    <sdk:DataGridTextColumn Header="项目名称" Width="Auto" Binding="{Binding Path=PROJECT_NAME}"  CanUserReorder="True" CanUserResize="True" CanUserSort="True"  />
                    <sdk:DataGridTextColumn Header="项目负责人" Width="Auto" Binding="{Binding Path=PROJECT_LEADER}" CanUserReorder="True" CanUserResize="True" CanUserSort="True"  />
                    <sdk:DataGridTextColumn Header="是否分包" Width="Auto" Binding="{Binding Path=PACKAGE_FLAG_CN}" CanUserReorder="True" CanUserResize="True" CanUserSort="True"  />
                    <sdk:DataGridTextColumn Header="是否可用" Width="Auto" Binding="{Binding Path=ENABLE_FLAG_CN}" CanUserReorder="True" CanUserResize="True" CanUserSort="True"  />
                    <sdk:DataGridTextColumn Header="计划状态" Width="Auto" Binding="{Binding Path=STATE_CN}" CanUserReorder="True" CanUserResize="True" CanUserSort="True"  />
                    <sdk:DataGridTextColumn Header="备注" Width="Auto" Binding="{Binding Path=REMARK}" CanUserReorder="True" CanUserResize="True" CanUserSort="True"  />
                </sdk:DataGrid.Columns>

WPF中数据绑定问题,布布扣,bubuko.com

WPF中数据绑定问题

标签:数据   width   问题   re   c   line   

原文地址:http://www.cnblogs.com/haofaner/p/3811355.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!