How to hide whole column if data is empty

Answered
Rudra Kumar Ganta asked on August 9, 2018

Hi Team,
can you please provide some solution how can i hide a whole column, if i don't have data in that column .

Please refer screenshot for your reference.

Note: i used below code to hide the (blank) text:
      localization: {
        grid: {
       "blankMember": ""
       }

Thanks
Rudra

4 answers

Public
Iryna Kulchytska Iryna Kulchytska Flexmonster August 10, 2018

Hi Rudra,
 
Thank you for posting your question on the forum.
 
As I can see from the screenshot, User Administration column does not have any members except the blankMember. In this case I would suggest you to remove this column from the JSON/CSV data when you pass them to the pivot table component.
Also, User Administration column can be removed from the slice by a user via Field List.
Unfortunately, there is no property in the component that can hide a column automatically, if there is no data in that column.
 
Please let me know if you have any further questions.
 
Kind regards,
Iryna

Public
Rudra Kumar Ganta August 10, 2018

Hi Iryna,
Thanks for your reply. instead of hiding the whole column. is there any way i can hide the empty valued checkbox inside the popup?

Please refer screenshot.

Thanks
Rudra

Attachments:
emptyval_pop.png

Public
Rudra Kumar Ganta August 10, 2018

attached one more image with both empty values and data in rows.

Thanks
Rudra 

Public
Tanya Gryshko Tanya Gryshko Flexmonster August 15, 2018

Hello, Rudra,
Thank you for your response!
It is not possible to hide the empty valued checkbox inside the popup. However, you can make it deselected. As a benefit of such deselecting, the empty value is not displayed on the grid. Please check out the following sample: https://jsfiddle.net/flexmonster/pz431qp5/179/ (line 38).
Let me know in case of any other questions.
Regards,
Tanya

Please login or Register to Submit Answer