I'm partially guessing here, but it seems to be saying that you cannot make
the currently selected row invisible, or more specifially the row that the
pointer is currently on.
You could try using
dgrDeelleveringen.CurrentRowIndex = x;
Before your loop that sets the visible property.
Where x is a row that you ARE NOT going to make hidden.
From what it seems to be saying, I don't think it's possible to hide ALL the
rows in the table...(?)
You will have to leave at least one row visible (the row the CurrentRowIndex
needs to be pointing at).
HTH??
Chris.
"Nader" <na**********@gmail.comwrote in message
news:11*********************@h54g2000cwb.googlegro ups.com...
>
Chris, Hier you are:
System.InvalidOperationException was unhandeld
Row associated with the currency manager's position cannot be made
invisible.
And hier the explanation:
An InvalidOperationException exception is thrown in cases when the
failure to invoke a method is caused by a reason other than an invalid
argument. This may be thrown by .NET Framework methods when the
underlying Win32 method cannot be invoked.
I hope that this says more to you then to me :)
ChrisM schreef:
>Ok,
So what is the exception that it gives?
"Nader" <na**********@gmail.comwrote in message
news:11*********************@h54g2000cwb.googlegr oups.com...
As long as it's the last Row it makes it invisible but whene the next
Row comes it gives an exception.
ChrisM schreef:
What actually goes wrong?
Cheers,
Chris.
"Nader" <na**********@gmail.comwrote in message
news:11*********************@h48g2000cwc.googlegr oups.com...
It's easy to make the last row in a datagrid (filled with a table)
invisible:
datagridObject.Rows[i].Visible = false
BUT if 'i' is not the last row then things go wrong.
I even tried:
for (int i = datagridObject.Rows.Count - 1; i >= 0; i-- )
{
dgrDeelleveringen.Rows[i].Visible = false;
}
And it doesn't want to work.
Someone please HELP