Skip to content

Infragistics Community Forum / Web / Ignite UI for jQuery / Specifying an initial column to sort on when igGrid is first rendered

Specifying an initial column to sort on when igGrid is first rendered

New Discussion
Scott Myers
Scott Myers asked on May 12, 2015 7:18 PM

I’m sure i’m missing it, but I have not seen a way to configure the igGrid to initially sort on a specific column and sort direction when the igGrid is first displayed.  Can you shed any light on this?

Thanks.

Sign In to post a reply

Replies

  • 0
    Vasya Kacheshmarova
    Vasya Kacheshmarova answered on Apr 21, 2015 1:02 PM

    Hello epsiwebdev,

    Thank you for posting in our community.

    What I can suggest is using Sorting features columnSettings. This is a list with columsn settings that specify custom sorting settings for a specific column(whether sorting is enabled/disabled,default sort direction etc.). You could specify the column that you you would like to sort by its key and set it sorting direction. For example:

      $("#grid").igGrid({                dataSource: data,    features:[     {      name: "Sorting",       columnSettings : [                {                     columnKey: "Age",                     allowSorting: true,                      currentSortDirection: "descending"                }            ]     }     ]  
    
    

    I created a small sample illustrating my suggestion and I am attaching it or your reference. In my sample Age columns is initially sorted in descending direction.

    Please have a look at my sample and let me know whether it helps you achieve your requirement.

    I hope you find my information helpful.

    Pleas elet me know if you have any additional questions regarding this matter.

    • 0
      Vasya Kacheshmarova
      Vasya Kacheshmarova answered on Apr 24, 2015 3:29 PM

      Hello epsiwebdev,

      Please let me know if you need any further assistance with this matter.

      • 0
        Scott Myers
        Scott Myers answered on May 12, 2015 7:18 PM

        Thank you.

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Scott Myers
Favorites
0
Replies
3
Created On
May 12, 2015
Last Post
10 years, 9 months ago

Suggested Discussions

Tags

Created by

Created on

May 12, 2015 7:18 PM

Last activity on

Feb 20, 2026 12:44 PM