protected void RadGrid1_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e) { var presenter = new PMLoaiPhong(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 PMLoaiPhong(this); DataTable dt; dt = presenter.List(txtsearch.Text); RadGrid1.DataSource = dt; RadGrid1.DataBind(); }