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

Hide column with css mediaquery

1 Answer 21 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
aykut
Top achievements
Rank 1
aykut asked on 28 Jul 2019, 08:01 PM
I love treelist. I have a web app needs to be viewed in mobile screens. To do so I need to hide some columns so treelist fits the screen. I did some experimets but none of them was successful.Lets say I have 10 columns and I need to hide 7 of them. I managed to hide them but rest of the columns nevert expanded to fill the screen. There always remain a white space at the left of treelist as if there's something occupies the space.


Can anyone please show me howto completely hide columns of threelist with CSS mediaquery please ? I've spent one week for this but no luck.

Best.

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 31 Jul 2019, 11:16 AM
Hi Aykut,

Thank you for the nice feedback.

You will need to use the built-in hide() and show() methods of the treelist to achieve that:
https://docs.telerik.com/devtools/aspnet-ajax/controls/treelist/client-side-programming/overview#treelistcolumn-client-object

You can use the pageLoad() or some body resized event handler to get the screen/window/port size and execute your custom JavaScript logic to hide or show the treelist columns. For instance, you can use the $telerik.getViewPortSize().width approach to get the current size.

I hope this will prove helpful.

Regards,
Eyup
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
TreeList
Asked by
aykut
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or