回复 3楼suntongowen的帖子
安装产品后,可以在如下路径找到相关示例,有演示如何在C1DataGrid绑定一个combolist:
C:\Users\aliceyue\Documents\ComponentOne Samples\Studio for WPF\C1.WPF.DataGrid\CS\C1DataGrid_ComboCols2010
另外还有绑定到list的代码参考:
- var FormatList = new List<ComboItemsSource>();
- ComboItemsSource item;
- for(int i=0;i<4;i++)
- {
- item =new ComboItemsSource();
- item.DisplayFormat=i.ToString()+"*"+"A";
- item.SelectedFormat="A"+i.ToString();
- }
-
- this.Resources.Add("FormatList", FormatList);
复制代码- <c1chart:DataGridComboBoxColumn DisplayMemberPath="DisplayFormat" SelectedValuePath="SelectedFormat" Header="Format" Binding="{Binding Format,Mode=TwoWay}" ItemsSource="{StaticResource FormatList}"></c1chart:DataGridComboBoxColumn>
复制代码 |