Question T7078
Visible to All Users

Analytics table appending actions column

created 4 years ago

I implemented regular survey flow in my application. Bu after an end user participates on it I may need to check their answers and accept or reject them. I thought about using analytics table and prepending an actions like column but after checking examples on the site there does not seem to be any relevant thing and scouring the code showed that the rendering is a bit buried under layers and nothing for appending. I hope to be wrong in this matter because writing a custom table adapter for survey model and answers seems to be hard job.

My question is: Is there any way to achieve what I want with the current state of the tables

I am using library in a react application.
For table I do not have any disposition, datatable or tabulator would be fine

Thank you.

Answers approved by surveyjs Support

created 4 years ago

Hello,

Columns of a table with results are bounded to survey questions.
You can render custom markup in the expandable row area marked by "…".

This is the sample code of the "Delete" button extension:

JavaScript
SurveyAnalyticsTabulator.TableExtensions.registerExtension({ location: "details", name: "delete", visibleIndex: 1, render: (table, opt) => { const btn = SurveyAnalyticsTabulator.DocumentHelper.createElement( "button", "rounded-button rounded-button--danger", { innerHTML: "Delete Result", onclick: (e) => { e.stopPropagation(); opt.row.remove(); }, } ); return btn; }, });

Here is the working plunker sample - https://plnkr.co/edit/vxneO9kntOwNGp46

Thanks, Serge
SurveyJS Team

    Comments (2)
    O O
    Ondokuzon Yazılım AŞ 4 years ago

      Thank you very much, this accomplished what I wanted

        You are welcome!

        Thanks, Serge
        SurveyJS Team