Author Topic: Customizing Column Menu Items in ParamQuery Grid  (Read 2850 times)

markn

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 5
    • View Profile
Customizing Column Menu Items in ParamQuery Grid
« on: December 05, 2024, 02:16:29 am »
I am working with ParamQuery Grid and have a heavily customized header using a function, generateColbannerHTML. This function creates a complex HTML structure for the column headers, as shown below:

var colAP = {
    title: generateColbannerHTML(resid, resourceResult),
    //title: resid,
    dataIndx: key,
    valign: "center",
    hidden: false,
    align: 'center',
    datatype: "integer",
    width: 140,
    align: "right"
}


While this works great for the grid's display, I am encountering an issue with the column menu. When a user clicks the menuIcon to filter or choose visible columns, the content displayed in the column menu reflects the raw HTML generated by generateColbannerHTML.


Is there a way to customize or override the items displayed in the column menu so that it shows a clean, user-friendly label instead of the raw HTML from the title property?

Thank you for your assistance!

Best regards

mikep

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 167
    • View Profile
Re: Customizing Column Menu Items in ParamQuery Grid
« Reply #1 on: December 05, 2024, 07:16:00 pm »
Here's a simple example: https://jsfiddle.net/uftvsqc6/

Can you update the columns selector to just show "Rank".


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6364
    • View Profile