how to insert multiple data in the same cell?

how to insert multiple data in the same cell?

ratchadewiratchadewi Posts: 3Questions: 2Answers: 0

Hello,

I'm using datatables to populate my list of students

columns: [
        { data: 'enrollment_no', name: 'enrollment_no' },
        { data: 'academic_session_name', name: 'academic_session.name' },
        { data: 'first_name', name: 'first_name' },
        { data: 'last_name', name: 'last_name' },
        { data: 'picture_taken_authorization', name: 'picture_taken_authorization' },
        { data: 'picture_published_authorization', name: 'picture_published_authorization' },
        { data: 'authorize_leaving_the_school', name: 'authorize_leaving_the_school' },

But I want the last 3 columns' data to be put in the same cell, in a list,
* 'picture_taken_authorization'
* 'picture_published_authorization'
* 'authorize_leaving_the_school'

How can I do it?

Many thanks in advance.

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    edited April 2022

    Yep, that's possible with columns.render - this Editor example is demonstrating something similar, take a look at how the first_name and last_name fields are joined to give the single column,

    Colin

Sign In or Register to comment.