Ok i found a solution for this.
Basically you need to reset the filter on page load.
What i did is i added a hidden text box that holds the SqlDataSource1.FilterExpression value. And on page load if its a postback, i just re apply it...
SqlDataSource1.FilterExpression = txtFilter.Text;
and viola! fixes the edit and also the paging problem (caused by the same thing).
found the solution here: