Loop over cards in the UI - google-app-maker

Is there someone who can tell me how you loop over the contacts in the template "Vendor ratings" please ?
I give you a screenshot of the page. To reproduce, go to the "Contacts" page, add a new contact and see two contacts...
I want to do the same behavior for my application and I don't know how to loop...
When I create a single card with a label binding #datasource.item.name for example, I only have 1 card displayed although in my datasource I have two results...
Thanks a lot for your help.

You are looking for widgets that can render repetitive data: List, Accordion, Grid. You can build prototype row/cell inside such widget, bind it to array of items (datasource) and App Maker's runtime will take care about the rest for you:

Related

Read from sqlserver and insert each line values to a table cell programmatically or from design

I am working on a Dotnetnuke module and i try to read the products i have in my sql server database.
I managed to read the data from the asp tools LinqDataSource and ive inserted them in listview etc. This is now what i need.
The ideal would be if i could read from database my table, and for each row on the db.table to dinamically create a asp:table cell in the design. The asp table ould be 4x5. so 4 columns and 5 rows, and each cell would include an image and the text i load from the database(the image wont load from db, its the same image for all products).
Also if there are more than 20 products then a 2nd page is created with the rest, and page navigation at the bottom.
this is the result i want.
I didnt try much programmatically as i dont really know how to start this. Only from design i tried a few things but they are like a listview so it doesnt help much.
Any ideas or suggestions people?
I managed to make the interface of the picture i provided and made all products clickable, all this from the design view with a ListView.
You can ask if you want any details

Flex/QNX scrolling gallery

I was hoping someone could give me some guidance on building an image gallery which loads images dynamically for a PlayBook application.I've uploaded a quick mockup of what I am trying to achieve, I want to dynamically load images into a QNX TileList or Flex equivalent and as the user scrolls through the list I want to call another 'page' of images dynamically. I have already produced an example which uses a custom cell renderer to dynamically load images but I am having problems when I attempt to identify when the user has reached the end of the list.
I have tried using the lastVisibleItem property of the list while the user is scrolling to identify if the last item visible in the list is also last in the DataProvider (so I know when I need to call for more images) but when I add images to the DataProvider it takes me back to the start of the list, can anyone tell me the reason for this?
Any advice on a different approach or how to modify the TileList would be greatly appreciated.
The scrollPosition automatically gets reset to 0 when you update the dataProvider. I've done workarounds that store the current scrollPosition before updating the dataProvider and then re-set it after the update to the dataProvider has completed. Let me know if you need some code sample and I'll see if I can dig something up.
Another option would be to use dataPaging. Here is a good example of how to do that:
http://www.jamesward.com/2010/10/11/data-paging-in-flex-4/

MVC3 - Multiple select process for a large list of items

Whats the best way to do the following in MVC3 (razor). User needs to pick one more more items from a List and click on button. The list can run into 40 to 100 items. Thats where my problem is, I am looking to see if there is any other solution (other than a list box) to do this more efficiently. Right now, I think I can do this by using a combination(or only one of) of an Auto complete text box and a list box in MVC3. Also how can I use list box in MVC3 with hard coded list tems.Any suggestions/ideas? Thanks in advance for your feedback.
You might want to take a look at using a list search functionality as described in this post it uses a jQuery plug in and you could always hook it up through an jquery ajax to get further data back from an MVC action method.
If this doesn't help then let me know and I'll try and put together an example in the morning.
Hope this helps.
Check out "jQuery UI Multiselect" http://www.quasipartikel.at/multiselect/

Custom Controls and States

I've got an <mx:Button> in my application, I have 10 items in an XML Node. What I'd like to do is when the button is clicked show the next 5 XML Nodes.
How do I achieve this?
My code is as follows at the mo :
<mx:Button x="1380.65" y="582.65" styleName="rightButton"/>
The style is just setting the up / over and down states of the button. But I want it to function and show the XML nodes in groups of 5.
How are you displaying the first five items?
If you're displaying things in a list or DataGrid, I believe you can set the verticalScrollPosition to scroll the list via a button click.
If you are displaying items using TextInputs, custom component, or other non-renderer-based classes, you just need to manually write some code to update the display elements based on the currently displayed index and what is next.
Can you offer a running sample? That may us direct you!

How to Customize ListView in QT

HI..
i am new to QT,i want to know how to customize the listview in QT i.e i want to add multiple icon in single row.. etc.. i tried lot i am not getting how to do that..
i tried with Qlistwidget, in tat i can only insert single row with one image.. i am not able to place multiple icon with desired locations..
please assist me, which control is good listview or listwidget.
and how to customize the same according to my view
if you have any sample examples. please provide me the link.
Thanks
You can implement a delegate to customize the rendering of the items in your view.
From the model/view programming docs: delegates are responsible for rendering individual items in the views.
See the pixelator sample for example usage.
Take a look at QTableView or QTableWidget. You can insert the icons in the first two columns and the text in the third column. Or any other way you like it.
I guess you can use some delegates.
Have a look at http://qt.nokia.com/doc/4.6/model-view-delegate.html
Hope it helps !

Resources