Question T13645
Visible to All Users

Sort questions in an Element Selector popup

created 2 years ago (modified 2 years ago)

[Ticket cloned from T13511: Can we make Question traverse more easier?]

Hi Jane,

Thanks for sharing this.

Is it possible to change the order or sort the questions in this popup?

Thanks,
Santosh

Answers approved by surveyjs Support

created 2 years ago

Hello Santosh,
A property grid's element selector displays survey elements in a tree form. Elements logically grouped to follow the survey structure. A survey is a root, and questions are displayed as survey/page nodes. You can review the source code which creates an element selector popup content: https://github.com/surveyjs/survey-creator/blob/master/packages/survey-creator-core/src/property-grid/object-selector.ts#L60.

Unfortunately, there is no option to to sort a survey element list.
If you wish to display survey elements sorted rather than grouped by pages, you can implement a custom element selector popup and add a custom toolbar action which would activate this popup. To programmatically select an element, set the creator.selectedElement property.

Please let me know if you have additional questions.