欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

WPF--DataGrid的使用

程序员文章站 2022-04-08 17:53:29
...
<DataGrid 
Grid.Row="2" Width="727" Height="379" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,35,0,0" Name="dgv" CanUserAddRows="False" SelectionChanged="dgvBoxList_SelectionChanged" CanUserResizeColumns="False" CanUserResizeRows="False" AlternatingRowBackground="Lavender" Background="White" ColumnHeaderHeight="40" RowHeight="40" SelectionUnit="FullRow" SelectionMode="Single" GridLinesVisibility="None">

       <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding BoxId}" Header="试试" Width="103"></DataGridTextColumn>
                <DataGridTextColumn Binding="{Binding Name}" Header="" Width="103"></DataGridTextColumn>
                <DataGridTextColumn Binding="{Binding Drugs}" Header="" Width="103"></DataGridTextColumn>
                <DataGridTextColumn Binding="{Binding Drugss}" Header="" Width="103"></DataGridTextColumn>
                <DataGridTextColumn Binding="{Binding Num}" Header="" Width="103"></DataGridTextColumn>
                <DataGridTextColumn Binding="{Binding AlarmL}" Header="" Width="103"></DataGridTextColumn>
                <DataGridTextColumn Binding="{Binding Ala}" Header="" Width="103"></DataGridTextColumn>
            </DataGrid.Columns>
        </DataGrid>
相关标签: datagrid

上一篇: 深拷贝和浅拷贝

下一篇: C++读文件