Author Topic: Custom formatting in column header  (Read 165 times)

markn

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 4
    • View Profile
Custom formatting in column header
« on: July 25, 2024, 04:25:10 am »
Is there a way to do custom html/css in a column header in the grid.

                                var row = {
                                    title: studentname ,
                                    align: "center",
                                    colModel: colDT
                                }

This would put the student name in for the colum header.  I would like to put more information in the header.  Put in something like name and then underneath email and so on.

Something like:

Name
email
phone number

and add some custom css to the various values.

I hope that makes sense.
« Last Edit: July 25, 2024, 04:34:17 am by markn »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6307
    • View Profile
Re: Custom formatting in column header
« Reply #1 on: July 25, 2024, 09:05:49 am »
you can write title / header of a column in simple html and inline css.

Code: [Select]
title: "<p>Rank</p><p style='font-weight:bold;'>Email</p>"