Question T17555
Visible to All Users

Custom properties on matrix columns

created 9 months ago (modified 9 months ago)

Hello! I'm trying to add a few properties to the matrixdropdowncolumn
Below is the code I have, taken from other questions here

TypeScript
serializer.addProperty('matrixdropdowncolumn', { name: 'test:number', }); SurveyQuestionEditorDefinition.definition[ 'matrixdropdowncolumn' ].properties?.push('test');

This is what I get
Clipboard-File-1.png

However, I cannot find that property when I click to edit a certain column, it's only visible in this view, which for us doesn't really work because we need to add a bunch of properties, including some custom property types, is there anyway I can achieve that? I look a lot for it but couldn't find anything…

Thanks you!

Answers approved by surveyjs Support

created 9 months ago

Hello,
To remove custom column properties from the columns table editor and display custom properties when a user clicks Edit for a column, set the showMode attribute to form.

JavaScript
serializer.addProperty('matrixdropdowncolumn', { name: 'test:number', showMode: "form" });

Let me know if you have further questions.

    Comments (2)

      That works, thank you so much!

      Are there any resources available where I could've seen this? I couldn't find any on the official docs

        You are always welcome. We haven't yet documented this option but may do so in the future.

        Thanks