How to add images to photogallery at runtime

Trying to use the Jqx photogallery control and want to load images that are pulled from a database at runtime. There is no documentation about this - how would this happen? Thanks

The PhotoGallery has a list of images - you’ll want to append to that list.

Here is how to reference that list:

$("#PhotoGallery1 .jqx-scrollview-inner-wrapper")

Here is what an entry on that list looks like:

'<div class="jqx-scrollview-page jqx-scrollview-page-classic" style="float: left; width: 257px; height: 247px;"><div class="PhotoGallery1_photostyle" style="background-image: url(p6.png);"></div></div>'

So, to add an entry, you would do this:

s='<div class="jqx-scrollview-page jqx-scrollview-page-classic" style="float: left; width: 257px; height: 247px;"><div class="PhotoGallery1_photostyle" style="background-image: url(p6.png);"></div></div>'
$("#PhotoGallery1 .jqx-scrollview-inner-wrapper").append(s)

Say the pictures are in a folder in the Project folder named ‘images’. Can you give me an example with the name of the picture in it? Say it is named image/myDog.png.

Do you know the names of the files in the folder? There isn’t any way to get that list at runtime: web apps are limited in how much they can access the user’s filesystem.

No - the files will come from files the user uploads to the database. The app will get all the images the user has uploaded, then show them in the photogallery.
Could we use standard names, like pic1.jpg, pic2, jpg, etc. Then at runtime once we retrieve the images from the database, we could rename them these names and then the images would show?..

Are the pictures in a file folder or a database?

Database. The app loads them with it first starts.

It’s still not clear to me how the images will be stored.

The code above uses a css background-image, which expects a url(filename).