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.
Thank you.
Hello epsiwebdev,
Please let me know if you need any further assistance with this matter.
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.
http://help.infragistics.com/jQuery/2015.1/ui.iggridsorting#options:columnSettings
When you define the column settings you can specify the 'firstSortDirection'.
See:
http://help.infragistics.com/jQuery/2015.1/ui.iggridsorting#options:columnSettings.firstSortDirection
Do note the differences in the CODE and the API for ASC and DESC. Try both to see which one picks up. More than likely a bug in the documentation.