I am having the same problem with the Repeater as I used to have with the table: when you add a dataset to the page AND put in a query on that dataset in code, the page first displays ALL rows (no criteria in dataset definition) and then, after a second round trip to the DB, shows the result of the query (= less rows).
I solved this by deleting the dataset on the page and getting rid of the $onReady on the dataset in code. If you do, the table magically maintained its relation to the collection and the chosen fields to display.
The repeater, unfortunately, works different. If you delete the dataset, the repeater looses connection to collection and fields. So I put the dataset back in. But this results in the same behaviour as the table at first:
1) all rows are shown
2) query is executed, less rows are returned, repeater result is smaller.
Now, I can hide the repeater and show it after the query, but I would rather prevent the double trip to the DB. Is this possible?
Hi Giri,
Just to be sure that I understand the scenario properly-
Have you connected a table to your DB collection using the editor and added a query using code and the rows shows up and disappear after the query is executed? Why not trying firstly executing the query and afterwards setting the table rows using code?
If this is not the scenario, please provide us with a video of the issue using screencast so that we can better understand what you were referring. Simply recreate the issue while recording the steps. Add the screencast.com URL to your response.
Thanks,
Tal.
Andreas, wouldn´t that return the opposite: do the query, fill the repeater and when the dataset´s query calls back, it overwrites the selection of the query with the non-selection from the dataset?
Dont put it inside onReady Page but before maybe?