Hey all
I would like to know how can i validate that a record is not in a datagridview.. Im using a textbox to type the names in and by a press of a button the grid gets filtered.. I want a messagebox or justr a message to appear in the name is not there..I have got it right to filter but i want it to tell me that the record was not found.
Please help me..
Here is the code im using..
if (txtSearch.Text == String.Empty)
{
MessageBox.Show("Please provide a surname to search for", "Search option", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
else
{
dgvLearnerAllDetails.DataSource = bl.GetAllSortSearch(txtSearch.Text);
cmbClassFilter.Text = " ";
cmbGradeFilter.Text = " ";
txtNumberOfLearners.Text = dgvLearnerAllDetails.Rows.Count.ToString();
}