1
votes

I have a Kendo grid using the ASP.NET MVC wrappers with sorting, filtering and column menu enabled. As I'm sure most of you know, there are two clickable actions in each column header:

  • Clicking the title in the column header sorts the data in that column
  • Clicking the column menu icon (chevron icon) displays the column menu options

This grid has a lot of columns so real estate is at a bit of a premium. What I'd like to do is replace the sort action on the header text click with the column menu action. Essentially, I want the title in each column header to take the place of the chevron icon. When I click the header text in each column, I want the column menu options (sort asc, sort desc, columns, filter) instead of the sort.

Is this possible?

1

1 Answers

0
votes

I think it is, I've not done it personally but I think it is just a case of removing the "k-icon", "k-i-arrow-n" and "k-i-arrow-s" classes from the column header link on the on click event. you may need to use the following in the event to make sure Kendo is done setting the icon.

setTimout(function(e){
    // remove classes
},1);

Hope this helps.