Bug in nested qdatagrid pagination fixed

The issue #222 is addressed here
See the http://qcu.be/content/problem-nested-qdatagrid for the problem explanation and the original patch.