protected void IDSrch_TextChanged(object sender, EventArgs e) { TextBox t = (TextBox)sender; if (string.IsNullOrEmpty(t.Text)){ (GridView1.DataSource as DataTable).DefaultView.RowFilter = string.Empty; } else { (GridView1.DataSource as DataTable).DefaultView.RowFilter = string.Format("ID = '{0}'", t.Text); } }
Object reference not set to an instance of an object.
t
DataTable
rowfilter
DefaultView
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)