protected void Button1_Click(object sender, EventArgs e)
{
DataTable dt = this.GridView1.DataSource as DataTable;
string filter = "field1='" + this.DropDownList1.SelectedItem.Text + "' AND " +
"field2='" + this.DropDownList2.SelectedItem.Text + "' AND " +
"field3='" + this.TextBox1.Text + "' AND " +
"field4='" + this.TextBox2.Text + "'";
dt.DefaultView.RowFilter = filter;
this.GridView1.DataBind();
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment