I am using datagridview and its datasource is a BindingList.
But when I try to change the visibility of first row, I am getting InvalidOperationException.
How can I change first row’s visible value?
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I found how to do it.
You must specify:
datagridview.CurrentCell = null;
before setting:
row.Visible = false;
because if currentCell is in the row which is wanted to be hide, then mentioned problem occurs.
regards