Not directly but you say the view calls canFetchMore() three times and...Thanks but, I did not mentioned anywhere that I am fetching data in canfectMore().
That is, calling canFetchMore() three times results in 3 times the number of rows fetched in the model. You did not say that the view calls fetchMore() 3 times. If you had done that, then you would have been describing correct and expected operation. I assumed that you were describing unexpected behaviour. One obvious way that unexpected row fetching might happen is if canFetchMore() actually fetched rows.My prob : lets say I wanted to get top 100 items & form tree out of it, because of above behavior I am ending up with 3*100 (buffer size) items.
No, you would like it to only call canFetchMore() once but that is not a requirement on the view, just an assumption on your part.Problem is that canFetchMore() is calling 3 times when it supposed to call 1 time.
If canFetchMore() returns true then the view can call fetchMore() if it wants, and the correct behaviour of the model is to fetch more rows. The view will fetch rows as it requires and probably in some convenient quantity for its internal buffering/performance/rendering purposes (i would guess 256 rows if the sql model is anything to go by). If you do not like this behaviour then you are free to implement your own view.




Reply With Quote


Bookmarks