I have a datagridview that allows users to edit data, then when the changes are saved, row by row, the new values are validated in a stored procedure, and errors are reported back. The row's error text is set to the string returned by the procedure. Since there can be many rows in the grid, I added a check box to toggle showing only the rows with errors. Originally I looped through the rows and set the visible property to false if the errortext was empty. This worked fine, butcould bepretty slow.

Now I've altered the table to include an integer column named error which gets set to 1 if the row fails validation, and the grid row's errortext is set. Now when the user checks the box, the grid's bindingsource filter is set to "error=1", and the error rows only are displayed immediately, but the errortext has disappeared. In the debugger, I can see the row's errortext being set to "" when the filter is applied.

Any help will be appreciated.