Question Datagridview with multiple text

bentom123

Member
Joined
Feb 22, 2012
Messages
9
Programming Experience
1-3
Hi all

I have a vb.net project that connects to a sql database.
I have a form that contains a datagridview for the database.
The database itself contains many different columns (e.g. customer name, serial number, cust phone number, current status)
I am concerned about the current status column as it is needed to filter the records in the database. It has different values in each record, such as "Done" or "Waiting" or "Awaiting Collection" or "Damaged".
I can get the code to filter by only one of these texts e.g. I can filter down by the text "Done" or the text "Waiting"

What I actually want to do is to filter the datagrid down by NOT showing records with "Done" in the field.

Does anyone know how to do this???
 

bentom123

Member
Joined
Feb 22, 2012
Messages
9
Programming Experience
1-3
Done

Just found out - me.datagrid.Filter = String.Format("Status NOT Like '" & "Done") & "*'"
 
Top Bottom