ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: Jignesh on December 27, 2019, 12:14:26 pm

Title: Show/hide column has display <span> tag
Post by: Jignesh on December 27, 2019, 12:14:26 pm
Hi Paramvir,


I have attached screenshot where I have detailed about issue. Please let me know how to remove/hide span tag.


Thanks,
Cherish Patel
Title: Re: Show/hide column has display <span> tag
Post by: paramvir on December 27, 2019, 10:42:23 pm
I understand you have used span tag to add title to the column, html tags in the header cause issue with sorting too, so not recommended.

Please use getCellHeader method in refreshHeader event to add title instead of span tag.

Code: [Select]
refreshHeader: function(){
this.getCellHeader(params...).attr("title", "Description");
}

https://paramquery.com/pro/api#method-getCellHeader

--------------------

In version 7.0, it's much easier to add title with newly introduced attrHead property of column.

Code: [Select]
{
 attrHead: 'title="Description"',
 ..
}

https://paramquery.com/pro/api#option-column-attrHead
Title: Re: Show/hide column has display <span> tag
Post by: Jignesh on January 01, 2020, 04:21:40 pm
Hi Paramvire,

I have set discription on tooltip of header column label as attached in previous screenshot. Column Title has display properly. Please read my previous post on same.


Thank you
Title: Re: Show/hide column has display <span> tag
Post by: paramvir on January 02, 2020, 03:42:53 pm
By title I meant title attribute of span element which you have used to add tooltip to header cell.

Anyway if you want to keep using span element, please add gridOptions sub-option to menuUI option as below to fix the issue faced by you:

Code: [Select]
menuUI:{
gridOptions:{
columnTemplate:{dataType:'html'}
}
},
Title: Re: Show/hide column has display <span> tag
Post by: takao.sohara on May 27, 2020, 01:47:05 pm
Thank you. I was able to solve it safely.