SPGridView filter not working

04/06/2015 17:43

- SPGridView connected to datasource, but filter was not applied even if it was there.

- By comparing two examples I have found following difference in .designer file generated by Visual Studio

When I commented out first row and added row below, filter suddenly started to work

 //((System.Web.UI.IAttributeAccessor)(@__ctrl)).SetAttribute("FilterDataSourcePropertyName", "FilterExpression");
            @__ctrl.FilteredDataSourcePropertyName = "FilterExpression";