简体   繁体   中英

Display product images in a datagrid in 4 columns and X rows (VB.NET)

Hello I am building a POS system and would like to display a list of images all available products for selection.

So for example, if someone picks category: Shirts, a datagrid of images all Shirts in that category should appear.

The grid should show in a 4 by X matrix where X is the number of columns (dependant on the number of products obviously).

So the result should look something like this link (with only the pictures showing and no writing to keep it simple).

Any Ideas at all please? Not expecting code, just some guidance on how to kick this off.

There are a million different ways to accomplish this.

Repeater controls will simply repeat for every result you pass them, and could pretty easily be set to repeat horizontally, and provide a line break every four records. Them you would just need to repeat an image who's source was databound you each image for your products.

That's probably the simplest approach, but you could get all kinds of fancy with client side ui elements, paging, sorting, etc. Just depends on what you need and how long you have to work on this one piece.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM