Grid setOptions sortable = false clear header template UNEXPECTEDLY

2 posts, 1 answers
  1. Chris
    Chris avatar
    119 posts
    Member since:
    Oct 2015

    Posted 30 Jan 2018 Link to this post


    I met a problem about Grid Sortable : 

      Grid setOptions sortable = false clear header template UNEXPECTEDLY.

    What's going on ?? Why header template lost ? 
    How to avoid this situation or 
    how to disable sortable temporary and header template will not be cleared.

    Sample Code : 

                    columns.Bound(c => c.Column1)
                        <input type='number' class='k-textbox' onfocus="class1.focusAllDays({ element: this })" style='width: 50px; font-size: small;' />



        class1 : 

        focusAllDays: function(e)
          var grid = get your grid;
          grid.setOptions({  sortable: false });

    Best regards





  2. Answer
    Stefan avatar
    2950 posts

    Posted 01 Feb 2018 Link to this post

    Hello, Chris,

    The issue occurs because the header template is rendered on the server and after the setOptions method is used the template is lost on the client.

    We have an example how this can be resolved for the Toolbar template, but the logic is similar for the header:

    I hope this is helpful.

    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top