Page 1 of 1
Hide/show columns
Posted: Mon Jul 15, 2019 8:24 pm
by ga6riel
Hello,
How can I hide/show a column inside a Table component by JavaScript code?
I tried to do it this way to hide a column:
Code: Select all
const hdrName = this.report.getComponentByName('hdrName')
hdrName.enabled = false;
The property was setted to false but the column still remains visible.
Thanks.
Re: Hide/show columns
Posted: Mon Jul 15, 2019 8:59 pm
by Lech Kulikowski
Hello,
Unfortunately, it is not possible for the Table component. Please try to use DataBand with Text components.
Thank you.
Re: Hide/show columns
Posted: Tue Jul 16, 2019 8:05 pm
by ga6riel
Hello,
It seems that I am still not able to hide a column within the DataBand...
I am doing this:
Code: Select all
const Dataroot = this.report.getComponentByName('Dataroot');
Dataroot.components.getByName('datBreed').enabled = false;
this.viewer.report = this.report;
this.viewer.renderHtml("viewerContent");
But the column remains visible... Maybe I'm accessing the Databand columns in the wrong way...
Dataroot is a DataBand and datBreed is a text component.
Re: Hide/show columns
Posted: Tue Jul 16, 2019 9:55 pm
by Lech Kulikowski
Hello,
Please send us a sample project which reproduces the issue for analysis.
Thank you.