Rowfilter not working

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
 
M

Miha Markic [MVP C#]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top