Author Topic: Title or Heading of the column  (Read 315 times)

NearEarthObject

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 30
    • View Profile
Title or Heading of the column
« on: August 18, 2023, 10:31:41 pm »
Hi

on https://paramquery.com/pro/api#option-column-title

It is say that Title or Heading of the column. It can be a callback that returns html to be displayed as column title.

I have been trying different way to use a callback function without success.

And I can(t find nowhere a clear exmple,

Is there a way to get one ?

Thank in advance.


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Title or Heading of the column
« Reply #1 on: August 21, 2023, 06:41:18 am »
Code: [Select]
{
  //title: "Product ID",
  //title using callback.
  title: function( ui ){
return "Product ID from callback";
  },
  dataType: "integer", dataIndx: "ProductID", editable: false, width: 80
},

where ui is plain object having properties column and colIndx

context "this" of the callback is grid instance.
« Last Edit: August 21, 2023, 07:33:09 am by paramvir »

NearEarthObject

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Title or Heading of the column
« Reply #2 on: August 21, 2023, 03:55:33 pm »
Work liike a charm !

Much thanks !!