2008年11月26日

把DATATABLE数据筛选存入另一DATATABLE

摘要: DataTabledtColne=dt.Clone();DataRow[]drs=dt.Select();foreach(DataRowdrindrs){DataRownewdr=dtColne.NewRow();newdr.ItemArray=dr.ItemArray;dtColne.Rows.Add(newdr);}ResultTable.DataSource=dtColne; 阅读全文

posted @ 2008-11-26 10:00 恒波 阅读(208) 评论(0) 推荐(0)

(datagridview)如果单击列表头,全选.(第一列为复选框)

摘要: private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex == -1 )//如果单击列表头,全选. { int i; for (i = 0; i < this.dataGridView1.RowCount; i++) { this.dataGridView1.EndEdit();//结束编辑状态. string re_value = this.dataGridView1.Rows[i].Cells[0].EditedFormattedValue.ToS 阅读全文

posted @ 2008-11-26 09:44 恒波 阅读(690) 评论(0) 推荐(0)

导航