Get Free Trial

Any way to display only one column onload and based on user request can add more?

manoj asked on September 30, 2020


4 answers

Ravi Kumar September 30, 2020

Hi Manoj,
It is possible, earlier we applied the way you mentioned.
Keep only 1 column in SLICE.COLUMNS array during onloading and set to the flexmonster component, once the button “Revenue Filter” clicked, then again add extra column to SLICE.COLUMNS array and again set the updated SLICE.
slice.columns = [{uniqueName: “company”}]
After Button Click:
slice.columns = [{uniqueName: “company”}, {uniqueName: “total_Revenue”}]
This is the way we did and hope this might work for you.
Ravi Kumar

Milena Pechura Milena Pechura Flexmonster October 1, 2020

Hello, Manoj and Ravi,
Ravi, thank you for answering the question on the forum!
Manoj, thank you for your question and for providing detailed info about the desired component behavior.
As Ravi said, it is possible to change the number of columns displayed on the grid based on the user request.
Our team suggests using runQuery API call which allows rearranging hierarchies on the axes. Please call this method on click and pass a new slice object with an added column as a parameter.
We have prepared an example for illustration:
Do not hesitate to contact us in case any further questions arise.
Best regards,

Milena Pechura Milena Pechura Flexmonster October 15, 2020

Hello, Manoj!
We were wondering if our response helped you with your question.
Have you achieved the desired component behavior?
We would be happy to hear your feedback.
Best regards,

Milena Pechura Milena Pechura Flexmonster November 2, 2020

Hi, Manoj,
Hope you are doing well!
We are just checking in to ask if you have found our response helpful.
Could you please let us know if the suggested approach works for you?
Looking forward to hearing from you.
Kind regards,

Please login or Register to Submit Answer