If I understand your question correctly, I would't try to hide individual rows from the gridview. Instead I wouldn't include the row in the data items in the first place.
For example if the data is coming from a datatable, you could use
DataTable.Select Method (System.Data) | Microsoft Docs[
^] to filter out the rows you don't want to show. If the data is coming from a database, perhaps it would make sense to filter them out already when querying the table.