Ask Your Question
2

How can I make a row invisible in a datagridview?

asked 2022-02-03 11:00:00 +0000

djk gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-02-02 13:00:00 +0000

woof gravatar image

To make a row invisible in a datagridview, you can use the following code:

dataGridView.Rows[rowIndex].Visible = false;

Here, dataGridView refers to the datagridview control and rowIndex is the index of the row which you want to make invisible.

Setting the Visible property of the row to false will hide the row from the user's view. Note that the row will still exist in the datagridview's underlying data source and can be made visible again by modifying its Visible property.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-02-03 11:00:00 +0000

Seen: 8 times

Last updated: Feb 02 '22