c1DataGrid DataGridComboBoxColumn 数据绑定
c1DataGrid DataGridComboBoxColumn数据绑定您好,您是不会使用这个控件吗,在安装示例中有相应的Demo
Documents\ComponentOne Samples\WPF\C1.WPF.DataGrid\CS\C1DataGrid_ComboCols2010,有什么不懂得及时提问,我会尽我所能帮助您。 JeffryLI 发表于 2017-5-24 16:48
您好,您是不会使用这个控件吗,在安装示例中有相应的Demo
Documents\ComponentOne Samples\WPF\C1.WPF.Da ...
demo的代码编写方式,跟我们项目本身差别很大,我怎么去绑定combobox下拉数据
<c1:C1DataGrid Grid.Row="4" Grid.ColumnSpan="8"x:Name="dgConfigure" AutoGenerateColumns="False"
CanUserFreezeColumns="None"
RowHeight="30"
Height="300"
AlternatingRowBackground="White"
GridLinesVisibility="All"
SelectionMode="MultiRow"
ColumnHeaderClickAction="Select"
Style="{DynamicResource c1-DataGrid}">
<c1:C1DataGrid.Columns>
<c1:DataGridTextColumn Header="控件名称" Width="*" Binding="{Binding ControlName,Mode=TwoWay,ValidatesOnDataErrors=True}"/>
<c1:DataGridComboBoxColumnHeader="控件类型" Width="*" Binding="{Binding ControlType,Mode=TwoWay,ValidatesOnDataErrors=True}"/>
<c1:DataGridTextColumn Header="数据源名称" Width="*" Binding="{Binding DataSource,Mode=TwoWay,ValidatesOnDataErrors=True}"/>
<c1:DataGridTextColumn Header="默认值" Width="*" Binding="{Binding DefaultValue,Mode=TwoWay,ValidatesOnDataErrors=True}"/>
<c1:DataGridTextColumn Header="字段名称" Width="*" Binding="{Binding Field,Mode=TwoWay,ValidatesOnDataErrors=True}"/>
<c1:DataGridComboBoxColumn Header="查询方式" Width="*" Binding="{Binding QueryMethod,Mode=TwoWay,ValidatesOnDataErrors=True}"/>
<c1:DataGridTextColumn Header="显示Label" Width="*" Binding="{Binding LabelText,Mode=TwoWay,ValidatesOnDataErrors=True}"/>
<c1:DataGridNumericColumn Header="排序号" Width="*" Binding="{Binding LevelOrder,Mode=TwoWay,ValidatesOnDataErrors=True}"/>
</c1:C1DataGrid.Columns>
</c1:C1DataGrid> JeffryLI 发表于 2017-5-24 16:48
您好,您是不会使用这个控件吗,在安装示例中有相应的Demo
Documents\ComponentOne Samples\WPF\C1.WPF.Da ...
demo的代码编写方式,跟我们项目本身差别很大,我怎么去绑定combobox下拉数据
<c1:C1DataGrid Grid.Row="4" Grid.ColumnSpan="8"x:Name="dgConfigure" AutoGenerateColumns="False"
CanUserFreezeColumns="None"
RowHeight="30"
Height="300"
AlternatingRowBackground="White"
GridLinesVisibility="All"
SelectionMode="MultiRow"
ColumnHeaderClickAction="Select"
Style="{DynamicResource c1-DataGrid}">
<c1:C1DataGrid.Columns>
<c1:DataGridTextColumn Header="控件名称" Width="*" Binding="{Binding ControlName,Mode=TwoWay,ValidatesOnDataErrors=True}"/>
<c1:DataGridComboBoxColumnHeader="控件类型" Width="*" Binding="{Binding ControlType,Mode=TwoWay,ValidatesOnDataErrors=True}"/>
<c1:DataGridTextColumn Header="数据源名称" Width="*" Binding="{Binding DataSource,Mode=TwoWay,ValidatesOnDataErrors=True}"/>
<c1:DataGridTextColumn Header="默认值" Width="*" Binding="{Binding DefaultValue,Mode=TwoWay,ValidatesOnDataErrors=True}"/>
<c1:DataGridTextColumn Header="字段名称" Width="*" Binding="{Binding Field,Mode=TwoWay,ValidatesOnDataErrors=True}"/>
<c1:DataGridComboBoxColumn Header="查询方式" Width="*" Binding="{Binding QueryMethod,Mode=TwoWay,ValidatesOnDataErrors=True}"/>
<c1:DataGridTextColumn Header="显示Label" Width="*" Binding="{Binding LabelText,Mode=TwoWay,ValidatesOnDataErrors=True}"/>
<c1:DataGridNumericColumn Header="排序号" Width="*" Binding="{Binding LevelOrder,Mode=TwoWay,ValidatesOnDataErrors=True}"/>
</c1:C1DataGrid.Columns>
</c1:C1DataGrid> 我这边知道了,在BeganEdit 里面,去绑定combox数据源 :i0tw:
页:
[1]