How to set default column sorting to a grid

8 posts, 0 answers
  1. Yj
    Yj avatar
    1 posts
    Member since:
    Sep 2011

    Posted 27 Apr 2012 Link to this post

    I have a Keno Grid,  when first launched, it should be sorted on one column by descending order. How can achieve it? Is there any configuration parameters to set?
  2. Pechka
    Pechka avatar
    56 posts
    Member since:
    May 2010
  3. Kendo UI is VS 2017 Ready
  4. pucsoftware
    pucsoftware avatar
    24 posts
    Member since:
    Sep 2006

    Posted 10 Dec 2012 Link to this post

    I also need to have the grid's sort property established on the initial page request. The link provided below show's how to invoke the "sort" method of the data source but not how to pre-configure the datastore or grid to already have an initial sorted field. I'm sure it can be done but don't see how based on this link. Can you provide more info?
  5. Chrys
    Chrys avatar
    45 posts
    Member since:
    Feb 2013

    Posted 17 Jun 2014 in reply to Pechka Link to this post

    This seems to be bad link only links to the landing page for keno
  6. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 18 Jun 2014 Link to this post

    This should be the proper link to the relevant help article section, guys:
    http://docs.telerik.com/kendo-ui/api/framework/datasource#configuration-serverSorting

    Regards,
    Sebastian
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  7. Masaab
    Masaab avatar
    15 posts
    Member since:
    Nov 2013

    Posted 17 Aug 2014 in reply to Yj Link to this post

    TO Sort a Grid That is bound to a server dataSource.
     
    @(Html.Kendo().Grid<DataTableRow>()<br>                                    .Name("GridDisplay")<br>                                    .DataSource(dataSource =><br>                                                {<br>                                                    dataSource<br>                                                        .Ajax()<br>                                                        .Read(read => read.Action("ActionName", "Controller", new  {Id = @Model.Id}))<br>                                                        .PageSize(10)<br>                                                        .Sort(a => a.Add("Date/Time").Descending())<br>                                                        .ServerOperation(false);<br><br>                                                }<br>                                    )
  8. Dan
    Dan avatar
    2 posts
    Member since:
    May 2014

    Posted 22 Aug 2014 in reply to Sebastian Link to this post

    Thanks for the correct link!
Back to Top
Kendo UI is VS 2017 Ready