how to hide row base on the specific value

  • Thread starter Thread starter euchan09
  • Start date Start date
E

euchan09

Guest
hello?

i have a table:

+--------------+--------------+------+-----+----------------+
| image | Item | Price | qty | Availability |
+--------------+--------------+------+-----+----------------+
|Image1.jpeg | laptop | 2000 |6 | Available |
|Image1.jpeg | cellphone | 1000 |5 | Unavailable |
|Image1.jpeg |ipad | 500 |7 | Unavailable |
+--------------+--------------+------+-----+----------------+

this table already showed in datagridview. Now I want to hide all the rows that contains " Unavailable "

i used this code:

For i As Integer = 0 To BunifuCustomDataGrid1.Rows.Count - 1

If BunifuCustomDataGrid1.Rows(i).Cells("Availability").Value = "Unavailable" Then
BunifuCustomDataGrid1.Rows(i).Visible = False


End If
Next

but it says:

"Row associated with the currency manager's position cannot be made invisible."

how can i solve this problem? can anyone please help me? Thank you!

Continue reading...
 
Back
Top