可以这样做
先把数据表里面的每一列都加到combo里面
然后再去设置不希望显示出来的column Visible属性
- GrapeCity.Win.MultiRow.InputMan.ListColumn listColumn1 = new GrapeCity.Win.MultiRow.InputMan.ListColumn();
- GrapeCity.Win.MultiRow.InputMan.ListColumn listColumn2 = new GrapeCity.Win.MultiRow.InputMan.ListColumn();
- GrapeCity.Win.MultiRow.InputMan.ListColumn listColumn3 = new GrapeCity.Win.MultiRow.InputMan.ListColumn();
-
- listColumn1.DataPropertyName = "Name";
- listColumn1.Header.Text = "Column1";
- listColumn2.DataPropertyName = "Age";
- listColumn2.Header.Text = "Column2";
- listColumn2.Visible = false;
- listColumn3.DataPropertyName = "Address";
- listColumn3.Header.Text = "Column3";
- listColumn3.Visible = false;
- this.gcComboBoxCell1.ListColumns.Add(listColumn1);
- this.gcComboBoxCell1.ListColumns.Add(listColumn2);
- this.gcComboBoxCell1.ListColumns.Add(listColumn3);
复制代码 |