Sort Grid Initialized from HTML Table

5 posts, 0 answers
  1. William
    William avatar
    23 posts
    Member since:
    Jan 2012

    Posted 20 Nov 2012 Link to this post

    Is it possible to implement sorting when the Grid is initialized from a HTML table?  I am just looking for an example of this, assuming it is possible to do.  Thanks.

    William Wade
  2. Dimo
    Admin
    Dimo avatar
    8331 posts

    Posted 21 Nov 2012 Link to this post

    Hi William,

    Yes, sorting of a Grid, which is created from an existing <table>, is possible. The widget creates a Kendo UI dataSource instance and fills it with the data from the table cells. Later on, this dataSource executes the data operations and populates the Grid. However, you should keep in mind that by default, all data fields will be of a string type and may not be sorted as expected, unless you specify a schema with a model.

    Greetings,
    Dimo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. William
    William avatar
    23 posts
    Member since:
    Jan 2012

    Posted 21 Nov 2012 Link to this post

    I set sortable to true, but nothing happens when I click on the column headers. 
    $("#grid").kendoGrid({
        height:500,
        sortable:true
    });
    I don't think there is anything special about my table.  Thanks.

    William Wade
  5. Dimo
    Admin
    Dimo avatar
    8331 posts

    Posted 21 Nov 2012 Link to this post

    Hello William,

    Please check for Javascript errors. If you don't have any, please provide a runnable jsFiddle / jsBin demo, which reproduces the problem.

    All the best,
    Dimo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. William
    William avatar
    23 posts
    Member since:
    Jan 2012

    Posted 06 Dec 2012 Link to this post

    Sorry to take so long in replying.  The issue was my version of KendoUI (discovered when building the fiddler example).  I upgraded to the latest build and it works.  Thanks.

    Wade

Back to Top
Kendo UI is VS 2017 Ready