If he only queries for the data for the visible records. Otherwise the query is going to take as long as it takes to DL all the data.
I was thinking some time ago about developing some paging scripts for the datagrid, using the LIMIT function of SQL, but I never actually had a reason for it. Also it dawned on me that I could not use findRecord or findIndex on a limited range of the data contained in the dgData. I have a datagrid that loads file data as in saved fillable form PDFs stored in large BLOB columns, and when I got to 15 forms or so, and I was on a slow connection, working with the Forms module took a substantial time to load all the data. What I did instead is just before making the query I deleted the column containing the form data from the select clause, so I only queried for columns not containing large amounts of form data. I query for the form data only when needed. Bob S > On Nov 8, 2019, at 12:25 , Richard Gaskin via use-livecode > <[email protected]> wrote: > > Dan Friedman wrote: > > > Say you have a form DataGrid that is displaying 100 entries. Each > > entry has an image (loaded from a server) and some text. When you > > set the dgData, it will get all 100 images as it's building the rows. > > This is obviously going to take some time to load. Is there a way > > to have the DataGrid only load the row's image when that row comes > > into view? This way it will load the images as they are needed. > > That's how the DG works, by design, and the main reason for using it over a > collection of nested groups. > > The DG will only populate rows as they are brought into view. At any given > time the number of rendered rows = the number of visible rows. > > I once made a media browser that allows access to 2600 images, and the DG > handled it like a champ. > > -- > Richard Gaskin > Fourth World Systems > Software Design and Development for the Desktop, Mobile, and the Web _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
