Hello, I have a small problem with a MetaDataGrid, performing a re-bind (for a search) and Pagination.
In the Constructor, the Datagrid and Pagination is defined:
$this->dtgPersonen = new PersonDataGrid($this);
$this->dtgPersonen->Paginator = new QPaginator($this->dtgPersonen);
$this->dtgPersonen->ItemsPerPage = 20;
To perform a quick search over the data, a Textbox and a Button exist with the following code.
protected function btnQuicksearch_Click($strFormId, $strControlId, $strParameter) {
$this->dtgPersonen->MetaDataBinder(QQ::OrCondition( /* my condition */ ), QQ::Clause(QQ::Distinct()));
$this->btnClear->Enabled = true;
}
It works fine, calling this method filters the data by the specified condition and the datagrid displays the first page properly, including Pagination data (“Show 10 records of 81” with 81 being the rows matching the cond.).
However, if a user clicks on the “2” to advance to the second page, not the second page of the result set is shown, but the second page of all rows, similar to BindAllRows() being called.
Clicking the Quicksearch button again on the second page shows the correct second page of the result set.
Did I miss something or is this a Paginator bug?