c1:C1DataGrid 能直接设定需要显示的列吗?有代码吗?案例里都是这样,没有看到从哪设置需要显示的列的。
<c1:C1DataGrid
x:Name="grid"
CanUserFreezeColumns="None"
IsReadOnly="True"
AutoGenerateColumns="True"
RowHeight="25"
AlternatingRowBackground="White"
GridLinesVisibility="All"
SelectionMode="MultiRange"
ColumnHeaderClickAction="Select"
Grid.Row="1"
ItemsSource="{Binding}">
<c1:C1RowIndexHeaderBehavior.RowIndexHeaderBehavior>
<c1:C1RowIndexHeaderBehavior InitialIndex="1"/>
</c1:C1RowIndexHeaderBehavior.RowIndexHeaderBehavior>
</c1:C1DataGrid>
能像下面这样设定需要显示的列吗
<DataGrid.Columns >
<DataGridTextColumn Header="ID" Binding="{Binding Path=ID}"/>
<DataGridTextColumn Header="公司名称" Binding="{Binding Path=名称}"/>
<DataGridTextColumn Binding="{Binding Path=tel}" Header="电话" />
<DataGridTextColumn Binding="{Binding Path=mail}" Header="Email"></DataGridTextColumn>
</DataGrid.Columns> |
|