Author Topic: Show / Hide column issue with colspan  (Read 2532 times)

karan.chauhan

  • Newbie
  • *
  • Posts: 2
    • View Profile
Show / Hide column issue with colspan
« on: May 11, 2018, 03:55:22 pm »
I am using version 2.3.0 of pqgrid. I am facing one major issue. When i hide any column that is coming under colspan columns from hide/show toggle option, then my merged cell include next cell inside merged cells. See my screenshots it will clear my problem.
I am using following code to merge cells:

let cellattr = {
     mediaTemplate: { 'colspan': 5, style: 'color:red;text-align:left;' },
     endUserRightsTemplate:{ style: 'display:none;' },
     businessOutletsTemplate:{ style: 'display:none;' },
     territoryTemplate:{ style: 'display:none;' },
     languageTemplate:{ style: 'display:none;' },
};

resultDataInner['pq_cellattr'] = window.$.extend(true, {}, cellattr)
resultDataInner['mediaTemplate'] = '<div class="td-column-red-color text-center">No Net Rights</div>';

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Show / Hide column issue with colspan
« Reply #1 on: May 11, 2018, 05:45:19 pm »
Sorry that's a limitation of free version as it doesn't have inbuilt support for merge cells unlike Pro version. It doesn't automatically adjust colspan when columns are shown/hidden.

You might have to adjust colspans manually whenever columns are shown/ hidden.