ComboBox绑定


DataTable dt = new DataTable
dt = //数据集
this.DisplayMember = //要显示属性的字段
this.DisplayMember.ValueMember
 =//要显示值的字
this.comboBox.DataSource = dt;

DataGridView禁止DataSource自动创建列

 

this.DataGridView.AutoGenerateColumns = false;

 

相关文章:

  • 2022-02-08
  • 2021-05-24
  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
  • 2022-12-23
  • 2021-05-16
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案