u011070946
R-danielmlc
2013-06-16 07:06

C# 中在datagridview中实例化了一些列,如何将把数据在这些列中显示出来?

  • c#
  • sql

D private void FrmIsDo_Load(object sender, EventArgs e)
{
ataGridViewTextBoxColumn column3 = new DataGridViewTextBoxColumn();
column3.HeaderText = "核定年月";
column3.Name = "column3";
dataGridView1.Columns.Add(column3);
DataGridViewTextBoxColumn column4 = new DataGridViewTextBoxColumn();
column4.HeaderText = "员工姓名";
column4.Name = "column4";
dataGridView1.Columns.Add(column4);
DataGridViewCheckBoxColumn column5 = new DataGridViewCheckBoxColumn();
column5.HeaderText = "养老企业核定";
column5.Name = "column5";
column5.DataPropertyName = "IsChecked";
dataGridView1.Columns.Add(column5);
DataGridViewCheckBoxColumn column6 = new DataGridViewCheckBoxColumn();
column6.HeaderText = "养老个人核定";
column6.Name = "column6";
column6.DataPropertyName = "IsChecked";
dataGridView1.Columns.Add(column6);
}
如何将数据表TB_IsDo里面的数据加上去,对应到这些列中?求解答?

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答