This is a migrated thread and some comments may be shown as answers.

Expand/Collapse with dynamic parameter

5 Answers 443 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sơn
Top achievements
Rank 1
Sơn asked on 27 Jun 2019, 02:08 AM

How to config expand/Collapse with dynamic parameter when initial load page.

Ex: I have parameters Collapse = True. The report load initial page collapse report But Collapse = False then The report load initial page expand all row in report.

Regards
TruongSon

 

5 Answers, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 01 Jul 2019, 01:28 PM
Hello Truong Son,

If I understood correctly, you want to expand and collapse a table's content (or TextBox items) based on a boolean parameter value. If that's correct, then I created a sample report demonstrating the approach of how to accomplish this. The report has the following specifics:
1) The report contains a CSV Datasource with Item and Value columns which are displayed in a Table.
2) There is also a report parameter with the following settings:
AutoRefresh: True
Name: Collapse
Type: Boolean
Value: True
Visible: True
3) Mark the detailed rows of the table (which contain =Fields.Item and =Fields.Value)
4) From the table's Properties grid, add Filter rule:
Expression: = Parameters.Collapse.Value
Operator: =
Value: =True

I hope that the report definition would be helpful. Let us know if any other questions come up.

Regards,
Neli
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Sơn
Top achievements
Rank 1
answered on 03 Jul 2019, 04:14 AM

Thanks for your answer. Unfortunately this is not answer i want.

I have attact 2 picture. You may seen it.

I Want show collapse or expand with row group 

Regards
TruongSon

0
Neli
Telerik team
answered on 05 Jul 2019, 02:48 PM
Hi Sơn,

To achieve this outcome, I suggest to use nested Panels and Action of the textboxes to toggle the visibility of the panels. Let me give you some extra details:
1) Add a panel which will cover all of the inner items and set its Visibility to False.
2) Then insert a textbox outside of the panel and set an action to toggle the visibility of the panel.
3) Add 2 boxes inside the panel- one for SLR and one for Tong SLR.
4) Add a smaller panel inside and set its Visibility to False.
5) Set an action to the SLR textbox to toggle the visibility of the smaller panel.

Repeat the steps until you achieve the desired result. The attached report demonstrated the given approach.

Regards,
Neli
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Sơn
Top achievements
Rank 1
answered on 09 Jul 2019, 03:30 AM

Hi Neli

This is answer  as same as i wish. But i want table collapse/ Expand with parameter dynamic.

I used toggle the visibility. In table row group properties I set Visible = False for each child group then load report initial collapse. If i want expand report so i set Visible = True. But i want collapse/expand with parameter dynamic.

Please help me. Thanks

 

 

0
Accepted
Todor
Telerik team
answered on 11 Jul 2019, 03:54 PM
Hi TruongSon,

The ToggleVisibility Action modifies the Visible property of the target item when clicked from the user. It cannot be controlled with Report Parameter, as Expressions cannot be used in Actions.
I suggest to try controlling the Visible property of the items with Binding to the value of a Report Parameter (type Boolean) instead, e.g.

Property path   |   Expression
Visible         |   = Parameters.Visible.Value

The scenario is not very clear to me, so consider opening a support ticket to provide a sample runnable report and more details about the requirement.

Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Sơn
Top achievements
Rank 1
Answers by
Neli
Telerik team
Sơn
Top achievements
Rank 1
Todor
Telerik team
Share this question
or