Page 1 of 1
Condition for Text-Component in GroupHeaderBand
Posted: Fri Mar 09, 2018 8:18 am
by tpontow
Hello Stimulsoft,
is it possible to define a condition for a StiText-Component which is placed in a GroupHeaderBand so that the text component is only enabled / shown if the group is expanded?
Thanks and regards
Thorsten Pontow
Re: Condition for Text-Component in GroupHeaderBand
Posted: Mon Mar 12, 2018 9:38 pm
by Alex K.
Hello,
In this case, you can place Text components from GroupHeader on the DataBand and by Condition show it only for the first line.
Thank you.
Re: Condition for Text-Component in GroupHeaderBand
Posted: Tue Mar 13, 2018 7:35 am
by tpontow
Is it then shown (with expanded Group) on following pages after page break as it is when i place it in Group header? Should Condition be (GroupLine == 1 => textComponent is enabled)?
Re: Condition for Text-Component in GroupHeaderBand
Posted: Thu Mar 15, 2018 6:56 am
by Alex K.
Hello,
Please send us a sample report which reproduces the issue for analysis.
Thank you.
Re: Condition for Text-Component in GroupHeaderBand
Posted: Thu Mar 15, 2018 7:43 am
by tpontow
Hi Alex,
thanks for your response. Meanwhile i found a solution that works for me. I used the GetTag-Event for components in compiled Report.
Code: Select all
dataBandComponent.GetTag += ChangeComponentAppearanceByCellInformation;
In the Event handler i use:
Code: Select all
if (textComponent.Parent is StiGroupHeaderBand groupHeaderBand)
{
bool collapsed = StiDataBandV2Builder.IsCollapsed(groupHeaderBand, false);
if (textComponent.Name.StartsWith("GroupHeaderText"))
{
textComponent.Enabled = !collapsed;
}
Kind regards
Thorsten Pontow
Re: Condition for Text-Component in GroupHeaderBand
Posted: Fri Mar 16, 2018 8:18 am
by Alex K.
Hello,
Thank you for the provided solution.