111,098
社区成员




private void botton1_Click(object sender, EventArgs e)
{
if (cb_chaxun.SelectedIndex == 0)
{
this.db_zongheTableAdapter.FillBy_shuxing(this.yiqiDataSet.db_zonghe, '%' + txt_chaxun.Text + '%');
}
}
DataView dv1 = new DataView(yiqiDataSet.db_zonghe);
dv1.RowFilter = "GroupID=" + GroupID; //筛选分组相同的信息
this.dataGridView1.DataSource = dv1; //dataGrieView1数据源为筛选后的数据
this.dataGridView1.Refresh();
var dv = new DataView();
DataTable dt2 = this.dataGridView1.DataSource as DataTable dv.Table = dt2;
dv.RowFilter = string.Format("xiangmu like '%{0}%'", txt_chaxun.Text);
this.dataGridView1.DataSource = dv;
DataSet ds = 你提取的数据。。。。
BindingSource bs = ds.Tables[0];
//表格对象
表格对象.DataSource = bs;
// 筛选的时候用如下语句,表格立即显示你筛选的结果
bs.Filter = 你的筛选语句。。。
// 回复默认的数据
bs.Filter = "";
var dv = new DataView();
dv.Table = dt;
dv.RowFiter = string.Format("字段 like '%{0}%'", xt_chaxun.Text);
dataGridView1.DataSource = dv;
foreach(DataGridViewRow row in grid.Rows)
{
foreach(DataGridViewCell cell in row.Cells)
{
if(Regex.IsMatch())
}
}