Allow sorting in 2 selected column but not all the columns in grid.

1 Answer 140 Views
Grid Sortable
Salma
Top achievements
Rank 1
Iron
Salma asked on 24 Nov 2021, 06:36 AM
HI I am using asp.net mvc .net (not core). Creating the grid.  The grid has multiple columns I only want to have sorting in 2 columns.  HOw I can do that?

1 Answer, 1 is accepted

Sort by
1
Accepted
Yanislav
Telerik team
answered on 26 Nov 2021, 02:34 PM

Hello Amir,

If you want to prevent a column from being able to sort the Grid, try adding the following configuration :

 columns.Bound(p => p.Freight).Sortable(false);

By default, the value for this configuration is 'true' for all the columns, and it's responsible for this, the columns to be able to sort the Grid.

Regards,
Yanislav
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid Sortable
Asked by
Salma
Top achievements
Rank 1
Iron
Answers by
Yanislav
Telerik team
Share this question
or