I have added a DataTable to the DataGridView in WinForms SystemTray App. I have two buttons in each row, like “public” and “Ignore”. When I click any of the two buttons the particular row which the buttons have the same index must be hidden.
I have added a DataTable to the DataGridView in WinForms SystemTray App. I have
Share
If you want to hide the DataGridViewRow in which a user clicked a button use the DataGridView’s
CellClickevent, like this:Notice that you need to suspend data binding to set the row’s
Visibleproperty to false.To display all the rows you’ve hidden rebind your DataGridView: