Fix query string problem with CListView and CGridView

Issue #2078