I want to use my textBox
to search on my datagridViewn
. I´m done this right now but just with the "Name" on database. I need the same textBox to search for "name" or "DataCad" (datacad is DateTime type) or "city". I have all this fields on my table.
if the user type "John", all users with this name show on grid. (alread work with the name). If user tipe "12/08/2017" it show all data with this day time. And same with "city".
Is this possible? Here is my code working with name:
if (!string.IsNullOrEmpty(txtSearch.Text))
{
pacientesBindingSource.Filter = string.Format("Nome LIKE '*{0}*'", txtSearch.Text);
}