protected void RadGrid1_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e) { var presenter = new PThPhieuChi(this); DataTable dt; if (txtsearch.Text == "") { dt = presenter.List(null); } else { dt = presenter.List(txtsearch.Text); } RadGrid1.DataSource = dt; }
protected void txtsearch_OnTextChanged(object sender, EventArgs e) { var presenter = new PThPhieuChi(this); DataTable dt; dt = presenter.List(txtsearch.Text); RadGrid1.DataSource = dt; RadGrid1.DataBind(); }