Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
Answered 27 views 1 reply what is igxPreventDocumentScroll not documented directive!?
posted

I am using igx data grid to display data. My data is coming from API. I need to display grid in ascending order by default. Please provide me sample how to achieve the same. ASAP.

  • 740
    Offline posted

    Hello Seo,

    Thank you for contacting Infragistics Community!

    I believe you will find the Remote Sorting/Filtering section in our Remote Data Operations Overview topic very helpful. There you can find more information regarding how to implement sorting and filtering features on igx-grid using remote data. As stated in this section, the first sample in the topic has already implemented sorting and filtering features. I’m attaching a modified version of it where when loading the page the column with “ProductID” is sorted in descending order. Please take a look at the ngOnInit method:

     this.grid.sortingExpressions = [
        {
            dir: SortingDirection.Desc, fieldName: "ProductID"
        }
    ];

    If this sample is not an accurate demonstration of what you are trying to achieve please feel free to modify it and send it back to me for further investigation.

    Please let me know if you need any further information.

    Best Regards,
    Martin Evtimov
    Entry Level Software Developer
    Infragistics, Inc.