Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

need to search data from datepicker in gridview C# winform

alpesh76alpesh76 SuratMember Posts: 1
edited September 2015 in .NET WinForms
                BindingSource bs = new BindingSource();
                bs.DataSource = dgvmember.DataSource;
                bs.Filter = dgvmember.Columns[2].HeaderText.ToString() + " LIKE '%" + dtpsdate.Text + "%'";
                dgvmember.DataSource = bs;

i have 1 datepicker
1 gridview & 1 button

i used this for searching Entry_date from datepicker in to datagridview

but i got error "Cannot perform 'Like' operation on System.DateTime and System.String."

see attched screenshot.

help me please.

Tagged:
Sign In or Register to comment.