Library Drag-and-Drop Ranking in Grid
Adds drag-and-drop ranking functionality to a grid question.
- Details
- Zachary Anderson
- Written for Lighthouse Studio 9.3
- Last Updated: 28 February 2017

Description
Transforms the specified rows or columns from numeric ranking to drag-and-drop ranking.
Instructions
- Any row / column that is going to be drag-and-drop should be set as ranking-type with numeric fields in the grid settings.
- Line 44 of the footer must be updated with the orientation of the grid.
- Line 45 of the footer must be updated with which rows / columns are to have drag-and-drop and how many items are to be ranked. Example:
rankedListValues = {
1: colsList.length, // set first row to drag-and-drop where all columns must be ranked (for col-oriented grid, use "rowsList.length")
2: 2 // set the second row to drag-and-drop where two items must be ranked
}
Uncommenting lines 48-50 will set each row to use drag-and-drop with all items being ranked.
Uncommenting lines 51-53 will set each column to use drag-and-drop with all items being ranked.
Options
- Line 54 of the footer can be updated with whether the first click should rank the entire row / column.
- Line 55 and line 56 can be used to hide the first row / first column of the non-mobile grid.
Notes
So alternating colors look best, it is recommended that you set "Alternating Color Direction" to the same value as your grid orientation.