locked
Create Listview with the same item appear in multiple groups?

    Question

  • Hi all,

    My scenario is this:

    • I have some movies detail
    • Every movie have its genres
    • 1 movie can have more than 1 genre

    Now, I can display movies in list view grouped in their first genre, I want to make movie appear in every genres it have. So how can I display the same movie in more than 1 group?

    Thanks anyway and sorry for my bad English.

    Thursday, May 23, 2013 7:42 AM

Answers

  • Hello,

    For your scenario, when you manipulate datasource for listview, you can create as many records as one movie's genre counter, so that, the same movie will appear as many time as its genre had in datasource. then, you can use genre as group key to sort the group, in that case, once you select a genre group, the movies belong to this genre will show. 

    Below is a simple sample in the following link please refer:

    #How to group items in a ListView (Windows Store apps using JavaScript and HTML)

    http://msdn.microsoft.com/library/windows/apps/Hh465464

    Hope this helps, thanks.

    Friday, May 24, 2013 7:48 AM

All replies

  • Hello,

    For your scenario, when you manipulate datasource for listview, you can create as many records as one movie's genre counter, so that, the same movie will appear as many time as its genre had in datasource. then, you can use genre as group key to sort the group, in that case, once you select a genre group, the movies belong to this genre will show. 

    Below is a simple sample in the following link please refer:

    #How to group items in a ListView (Windows Store apps using JavaScript and HTML)

    http://msdn.microsoft.com/library/windows/apps/Hh465464

    Hope this helps, thanks.

    Friday, May 24, 2013 7:48 AM
  • I guess your idea is an easiest way to do with this scenario. Thanks.
    Monday, May 27, 2013 11:57 AM