How to Sort Linked Content using Search List Box

Posted by Giovanni Mattucci on October 6, 2016

When displaying a field as a Grid, you can modify the order of items and bind this to a field of "SortIDs"

How do you do this with a Search List Box, where the user has selected items from a Shared Content List and then updated their order within the Search List Box?

The order of the IDs placed into the ID field doesn't update when reordering items in a Search List Box.

   0 people like this question
15 30 50   per page
   
  
 
 
   
Submit
Ok the IDs do update once the default sort order is set to "Item Order".

How here is how I am getting a list of items in my controller:

 var curriculumIDs = programDetails.CurriculumIDs?.Split(',').Select(int.Parse).ToList() ?? new List<int> { 0 };
 
 var curriculumList = programDetails.Curriculum.Items().Where(i => curriculumIDs.Contains(i.ContentID)).ToList();

Once I try to find the "programs" that match the IDs, that is when the order no longer is in order.
Posted By: Giovanni Mattucci

Previous Next

LOGIN

Log in with your Agility username and password or
register for the site




Log In

REGISTER












Register

FORGOT PASSWORD