private void GetRowsByFilter()
{
SqlDataAdapter DA = new SqlDataAdapter("select * from table",conn);
DataSet ds;
DA.fill(ds); string strExpr;
strExpr = textBox1.Text; DataView dv = new DataView(ds.Tables[0],"Name='"+strExpr+"'","Name",DataViewRowState.CurrentRows);
dataGrid1.DataSource=dv; }
}
{
SqlDataAdapter DA = new SqlDataAdapter("select * from table",conn);
DataSet ds;
DA.fill(ds); string strExpr;
strExpr = textBox1.Text; DataView dv = new DataView(ds.Tables[0],"Name='"+strExpr+"'","Name",DataViewRowState.CurrentRows);
dataGrid1.DataSource=dv; }
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货