sort on hidden column

4 posts, 0 answers
  1. Guillaume
    Guillaume avatar
    9 posts
    Member since:
    Jan 2015

    Posted 07 Mar 2016 Link to this post

    Is there a way to sort on a hidden column instead to the visible column?

    I need to sort on a datetime with a specific format but it doesn't work as it's a string



  2. Alexander Popov
    Alexander Popov avatar
    1445 posts

    Posted 09 Mar 2016 Link to this post

    Hello Guillaume,

    Yes, the DataSource can be order by a field of your choice using the sort method.

    Alexander Popov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Santosh
    Santosh avatar
    3 posts
    Member since:
    Nov 2012

    Posted 19 Jul 2017 in reply to Alexander Popov Link to this post

    Hi Alexander,

    I want to Sort a date column (which is displaying as string type) with value of other hidden column. As mentioned below

     LastCurDate: { type: "string" },
     dtLastCurDate: { type: "string" }

                            field: "dtLastCurDate", title: "Last Current", filterable: { multi: true, dataSource: [{ dtLastCurDate: 'Less than 14 days' }, { dtLastCurDate: 'Between 14 to 30 days' }, { dtLastCurDate: 'More than 30 days ago' }], checkAll: false }, sortable: true,
                            template: "<div class=\"displayInlineBlock\" style='width:140px;'>${LastCurrentDate}</div>"

  4. Konstantin Dikov
    Konstantin Dikov avatar
    2466 posts

    Posted 20 Jul 2017 Link to this post

    Hi Santosh,

    I will share the answer from the support ticket for other convenience:

    "In order for the values to be sorted as dates you will have to define the type as a date or define custom sorting function as documented in the following help article:

    If other questions arise on this matter we can continue the conversation in the support ticket.

    Konstantin Dikov
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 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