Kendo Grid Header - column context menu replaces default "sort" when clicking Header text

2 posts, 0 answers
  1. Randy
    Randy avatar
    2 posts
    Member since:
    Oct 2013

    Posted 13 Nov 2013 Link to this post



    I have a Kendo grid with sorting, filtering and column menu enabled.  Out of the box, there are two clickable actions in each column header:
      *  Clicking the title in the column header sorts the data in that column 
      *  Clicking the chevron column menu icon displays the column menu options
     
    What I’d like to accomplish - instead of a sort being applied when the title in the column header is clicked is for the column menu options (sort asc, sort desc, columns, filter) to appear.  Essentially, I want the title in each column header to take the place of the chevron icon.  Is this possible?  The main motivation is that some of the columns are just too narrow (ex: 40px)to properly display all the default icons.  Is there some event that can be intercepted to do this?  BTW, I am using the MVC  Html wrappers to setup the grid - if that matters.

    Thanks,
    R Cornish
  2. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2289 posts

    Posted 14 Nov 2013 Link to this post

    Hello Randy,

    There is not built-in way to achieve this, you can however modify the column header with custom headerTemplate. Here is an example for this / the first `OrderID` column / : http://jsbin.com/AluWIJif/1/edit

    Regards,
    Nikolay Rusev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top