Rowfilter not working

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have a datagrid on form1 with a filtered dataview. Works

Now I open form2 to add two new rows into the dataview - one of them doesn't match the filter and should not be shown. But it does! It's is shown on the last line of the grid. Debugging the values of the last dataviewrow shows it has values that doesn't match the rowfilter - and hence should not be shown. Other rows are filtered out
If I click on one of the other rows in the grid the "wrong" row disappears - as if the filter is applied again
Resetting the filter in code after adding the rows has no effect

regards benn
 
Hi Benny,

How are you adding rows to dataview?
Did you try calling DataRowView.EndEdit?

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

Benny said:
Hi,

I have a datagrid on form1 with a filtered dataview. Works.

Now I open form2 to add two new rows into the dataview - one of them
doesn't match the filter and should not be shown. But it does! It's is shown
on the last line of the grid. Debugging the values of the last dataviewrow
shows it has values that doesn't match the rowfilter - and hence should not
be shown. Other rows are filtered out.
If I click on one of the other rows in the grid the "wrong" row
disappears - as if the filter is applied again.
 
Back
Top