Skip to content

Infragistics Community Forum / Web / Ignite UI for jQuery / Grid columns not displaying sorting icon when bound to ig.DataSource

Grid columns not displaying sorting icon when bound to ig.DataSource

New Discussion
John McCann
John McCann asked on Dec 29, 2014 6:07 AM

I’m setting my igGrid datasource to an ig.DataSource object that has fitltering and sorting configured. The igGrid is not displaying the up down arrows icons on the column headers even though the columns are sorted. If I open the multi sort dialog and make a change, then the icons show accordingly. Is there a way to force/refresh the grid to show the sort icons?

My ig.DataSource configuration looks like this:

sorting: {

type: ‘local’,
caseSensitive: false,
mode: “multiple”,
persist: true,
expressions: [{fieldName: “lastName”, dir: “asc”}, {fieldName: “firstName”, dir: “asc”}]
}

Sign In to post a reply

Replies

  • 0
    Hristo Anastasov
    Hristo Anastasov answered on Dec 23, 2014 9:10 AM

    Hello John,

    Thank you for posting in the Infragistics community !

    In this scenario the the igDataSource sorts the data and grid is bounded to a sorted data. However no sorting is executed on the grid itself to force it to show the arrows. However after you open the sort dialog window of the grid and sort again then properly the arrows are shown.

    What you can do is handle the DataBound event of the grid and get the sorting expression. Then you can call the sortColumn method of the igGRidSorting widget using the same expression.

    Review the attached sample for demonstration.

    Please let me know if I may be of any further assistance to you.

    • 0
      John McCann
      John McCann answered on Dec 23, 2014 5:31 PM

      Thanks, this worked. I did find a strange behavior that tripped me up a few hours. I'm using the angular directives. I had to change my HTML markup to get this working. I changed from <div> to <table>. It seems odd that this would matter.

      <div data-ig-grid="gridOptions" id="employeeGrid"></div>

      to

      <table data-ig-grid="gridOptions" id="employeeGrid"></table>

      • 0
        Hristo Anastasov
        Hristo Anastasov answered on Dec 29, 2014 6:07 AM

        Hello John,

        I am glad this helped.

        The stranhe behavior you described is actually a well known limitation that is documented at help.infragistics.com/Help/Doc/jQuery/2014.1/CLR4.0/html/igGrid_Known_Issues.html under the Incorrect grid features API calls’ behavior with <div> elements section

        Please let me know if you have further questions on the issue.

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
John McCann
Favorites
0
Replies
5
Created On
Dec 29, 2014
Last Post
11 years, 2 months ago

Suggested Discussions

Created by

Created on

Dec 29, 2014 6:07 AM

Last activity on

Feb 11, 2026 1:31 PM