Sounds like the Row may have been shared. If instead of a foreach, you use
the Item method to fetch each row, it should be ok.
--
HTH,
Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist
I recycle.
I send everything back to the planet it came from.
"Ian Semmel" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Well, what I was trying to do was apply a filter determined by a number of
> check boxes at the top and just marking not visible those rows which did
> not apply by looping thru each row. (foreach datagridviewrow)
>
>
> Kevin Spencer wrote:
>> Well, that's a start. How are you setting the Visible property of the row
>> to false? Also, note that if a Row is shared, it will throw an exception
>> when you try to set the Visible property to false. You can unshare it by
>> accessing it through the DataGridViewRowCollection.Item method. Is it the
>> current Row?
>>
|