Difference between Data View and Data Detail?

Difference between Data View and Data Detail?

I have data in a Data Store

In short, and my limited understanding .... thats how I use them anyways.

Data View for multiple records
Data Detail for single records

3 Likes

The Data View component is used for client-side filtering, sorting, and paging. It replicates the server-side data (or any other data source), making it available for client-side manipulations.

The Data Detail component selects a specific detail record from the data source by key and displays it in data detail regions.

To add a bit more to this.

If you have a paged query in Server Connect, the data returned is just what is within the page selected. So if you have 1,000 records and set it to 20 per page, only 20 records are returned. The browser knows nothing of the other 980 records.

If you use Data View instead, the server returns all 1,000 records and the browser only displays 20 of them but they are there, downloaded and available.

In my opinion, the decision as to which to go with depends on the amount of data you have and the speed you want to achieve. Data View is much faster to page through as there is only one call to the database at the beginning but that means the first page takes longer to appear. However, paging through is then near-instant. Doing it with a paged query means you get that first page much faster but every time you click to the next page there's another call to the database and the next chunk of data is retrieved.

Both are an excellent solution. I generally use a Data View if my query is more complex and outside the scope of the Paged Query (a Custom Query for example) but prefer a paged query if I can.

Hope that helps!

5 Likes