views:

27

answers:

1

How can I hide a particular row in a GridView?

For Example

If I click 2/4/1/7 it will hide 3/5/2/8 correspodingly how to do this

A: 

You could try something like this

YourDataGridView.CurrentCell = null;
YourDataGridView.Rows[rowIndexToHide].Visible = false;

The first line set the CurrentCell to null because you can hide the selected row.

Jonathan