Author Topic: ColModel column width issue  (Read 317 times)

pranit@srcomsec

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 99
    • View Profile
ColModel column width issue
« on: March 28, 2023, 08:27:32 pm »
I need to set specific column ("Divider1") width to 6px. I have added below code but it is talking 13px. Please advise.

Code: [Select]
var colM =
[
{
title: "Token#",
dataIndx: "stInstrumentToken",
hidden: true,
align: "left",
tpCls: "header-css",
styleHead: {
            "font-weight": "bold",
            "color": "#fff",
            "font-family": "Tahoma",
            "background-color": "#666666",
            "font-size": "10px"
        },
},
{
title: "Series",
dataIndx: "Series",
hidden: true,
align: "left",
tpCls: "header-css",
styleHead: {
            "font-weight": "bold",
            "color": "#fff",
            "font-family": "Tahoma",
            "background-color": "#666666",
            "font-size": "10px"
        },
},
    {
title: "",
width: 6,
minWidth: 5,
dataIndx: "Divider1",
editable: false,
sortable: false,                           
cls: "pq-divider"                           
},
{
title: "LotSize",
dataIndx: "inLotSize",
hidden: true,
align: "left",
tpCls: "header-css",
styleHead: {
            "font-weight": "bold",
            "color": "#fff",
            "font-family": "Tahoma",
            "background-color": "#666666",
            "font-size": "10px"
        },
},
];

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: ColModel column width issue
« Reply #1 on: March 28, 2023, 10:14:07 pm »
It could be due to scrollModel.autoFit or flex layout.

Try setting maxWidth of the column too.

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

pranit@srcomsec

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 99
    • View Profile
Re: ColModel column width issue
« Reply #2 on: March 29, 2023, 11:48:21 am »
I have applied "maxWidth" to the column and its working.