private void txtfind_TextChanged(object sender, EventArgs e) { try { leave.LEAVEID = txtfind.Text; dataGridView1.DataSource = ldal.GetData_DateRange(leave); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "GridLike Error"); } }