grid column menu for hide/show only on the first checkbox column

1 Answer 423 Views
Grid
jerome
Top achievements
Rank 1
Iron
Iron
jerome asked on 26 Jan 2023, 02:43 PM | edited on 26 Jan 2023, 02:44 PM

I'm trying to reduce the clutter on the grid column headers. I love the idea of giving the users the power to hide and show columns but do not want to see those 3 dots on every column. For all other columns i just want the filter icon present.

I want to show the column menu only for the first column (first column is a selector checkbox). Version would be the latest and greatest. Is this possible?

 

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 31 Jan 2023, 10:44 AM

Hi Jerome,

 

Thank you for contacting us.

Yes, you can achieve this requirement with the following built-in property:

columns.Bound(o => o.ShipName).ColumnMenu(false);
As demonstrated here:
https://demos.telerik.com/aspnet-mvc/grid/column-menu

Feel free to give this option a try and let me know if it helps you.

 

Regards,
Eyup
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

jerome
Top achievements
Rank 1
Iron
Iron
commented on 17 Aug 2023, 09:24 PM

What if i didnt want to show the full column menu but i only wanted to show the filter menu? with the filter icon on the column?
Eyup
Telerik team
commented on 22 Aug 2023, 07:42 PM

For filtering you can have the icon within an individual row:
https://demos.telerik.com/aspnet-mvc/grid/filter-row

Or on the header cells next to column titles:
https://demos.telerik.com/aspnet-mvc/grid/filter-multi-checkboxes

The last option would be to use the .Events(e=>e.ColumnMenuInit()) handler to remove all options from the column menu other than Filtering:
https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/events/columnmenuinit

I hope this will prove helpful. Do not hesitate to let me know if I made a mistake somewhere or you need more particular and specific example/code. I will be ready to help you with any other inquires you might have.

Tags
Grid
Asked by
jerome
Top achievements
Rank 1
Iron
Iron
Answers by
Eyup
Telerik team
Share this question
or