Hide the Row in the DataGridView
Hi
i am working Hide or Unhide Rows in the DataGridView.
When i click RowHeader the corresponding row is hiding.
But i don`t want to hide the RowHeader.
The RowHeader should be visible when i click RowHeader, the remaining row should be hide.
B`se i want to access the RowHeader again for unhide the row.
I am using the below code for Hide the Row.
Code:
Private Sub datagridview1_rowheadermouseclick(ByVal sender As Object, ByVal e As DataGridViewCellMouseEventArgs) Handles DataGridView1.RowHeaderMouseClick
Me.DataGridView1.SelectionMode = DataGridViewSelectionMode.RowHeaderSelect
Me.DataGridView1.Rows(e.RowIndex).Visible = False
Me.DataGridView1.RowHeadersVisible = True
End Sub
Regards
Kumar
Re: Hide the Row in the DataGridView
That doesn't seem to make sense. The row header is part of the row. Hiding a row is an all or nothing deal. What you're asking for is hiding some of the cells. In that case you'd end up with a blank space where those cells would have been. What would be the point of that?