1

I have a data model that looks like this:

Group 1
--Sub group1
----item1
----item2
----item3

--Sub group2
----item1
----item2
----item3

Group 2
--Sub group1
----item1
----item2
----item3

--Sub group2
----item1
----item2
----item3

There will be n number of each group and I would like to display this data on screen.

A requirement is to use paging but I am a little unsure of how to effectively page when there are these groupings involved. Ordinarily I would just retrieve the next n records and append to the existing set but will need something a little more complicated.

Does anyone have any experience doing something like this? I don't want to grab entire sub groups at a time as they may contain too many or too few items, and would like to be consistent by pulling the same number of items each time.

  • Is this about designing the software implementation of adding new records to a grouped list like this, or about the user experience of whether it makes sense to do this kind of grouping on unfinished data sets? – Ixrec Mar 1 '16 at 16:04
  • Its more about the approach from a programming point of view – DavidB Mar 1 '16 at 16:07
  • What happens when your page size is 10 items but Group 1 has a total of 5 sub-items and Group 2 has a total of 7? Does Group 2 get included in the page? Does it get omitted? Or does it get truncated only to be resumed on the next page? These are important UX questions so I think you should start from a UX point of view first. That will help better define the problem you are trying to solve. – MetaFight Mar 1 '16 at 16:57
  • Ideally I would like to bring ten back regardless of group, if group 1 has nine, then these will be displayed plus the first from group 2. – DavidB Mar 2 '16 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.