We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid events subscriptions

Thread ID:

Created:

Updated:

Platform:

Replies:

148123 Oct 7,2019 12:25 PM UTC Nov 19,2019 12:44 PM UTC Angular - EJ 2 5
loading
Tags: Grid
Uladzislau Sipaila
Asked On October 7, 2019 12:25 PM UTC

Hello Syncfusion team

As part of our future application, we are going to use grids with a lot of common features. Seems like your grid is very useful, but I still have some questions.

1. Is it possible to implement infinite scrolling with your current grid? Do you support any scroll event that we can use to load the next set of data?
2. When we sort columns we need to do it via API. I walked through documentation and didn't find any useful way to subscribe on sort events and provide our own behavior for it?

Could you please let me know the best solutions for these 2 cases?

Thank you in advance,
Ulad

Thavasianand Sankaranarayanan [Syncfusion]
Replied On October 8, 2019 09:28 AM UTC

Hi Uladzislau, 
 
Greetings from Syncfusion. 
 
Query: Is it possible to implement infinite scrolling with your current grid? Do you support any scroll event that we can use to load the next set of data? 
 
We have validated your query and currently we don’t have support for infinite scrolling with our grid. We have already logged “Need to provide run time scroll (infinite scroll) option in Grid control” as a feature request list. It will be included in our any of our upcoming release. We will inform you once the release is rolled out successfully. Until then we appreciate your patience. 
 
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through the below link:   
 
 
Query: When we sort columns we need to do it via API. I walked through documentation and didn't find any useful way to subscribe on sort events and provide our own behavior for it? 
 
You want to customize the default sort action for a column. You can achieve your requirement by defining column.sortComparer property. Refer the below documentation for your reference. 
 
Help Documentation:                https://ej2.syncfusion.com/angular/documentation/grid/sorting/#sort-comparer 
                                             https://ej2.syncfusion.com/angular/documentation/grid/sorting/#sorting-events 

Please get back to us if you need further assistance. 

Regards, 
Thavasianand S. 


Uladzislau Sipaila
Replied On October 8, 2019 12:03 PM UTC

Hello Thavasianand,

Thank you for a quick answer!

Changing sortComparer function is not something that I'd like to do. Because we are not going to sort data on the client side. The only thing that we need from a component is sorting state (sort by column, sort direction). I'd like to prevent the default sorting behavior of the grid and do a new API call with a sorting state.

Do your events support  event.preventDefault() or something with similar behavior?

Regards,
Ulad

Thavasianand Sankaranarayanan [Syncfusion]
Replied On October 9, 2019 05:57 AM UTC

Hi Uladzislau , 
 
Thanks for your update. 
 
Query: The only thing that we need from a component is sorting state (sort by column, sort direction). I'd like to prevent the default sorting behavior of the grid and do a new API call with a sorting state. 
 
You want to prevent the default sorting behavior of the grid. You can achieve your requirement by using actionBegin event with requestType as sorting. You can get the sorting column name and sort direction in actionBegin event. Refer below code snippets and sample for your reference. 
 
[code snippets] 
<div class="control-section"> 
    <ejs-grid class="sortingenabled" [dataSource]='data' allowPaging='true' allowSorting='true' [pageSettings]='pageSettings' (actionBegin)='actionBegin($event)'> 
        <e-columns> 
            ... 
       </e-columns> 
    </ejs-grid> 
</div> 
... 
export class AppComponent { 
    ... 
 
    actionBegin(args: any): void { 
      if(args.requestType == "sorting"){ 
        console.log("Column Name: "+ args.columnName);      //getting sorting column name 
        console.log("Sorting Direction: "+ args.direction); //getting sort direction 
        args.cancel = true;                                 //prevent sorting action 
      } 
    } 
} 
 


Please get back to us if you need further assistance. 

Regards, 
Thavasianand S. 


Katsiaryna Sachko
Replied On November 18, 2019 09:32 AM UTC

Hello Syncfusion team,

I would like to clarify when infinite scrolling will be released? If it's possible could you give an estimate time period?

Thank you in advance,
Katsja

Thavasianand Sankaranarayanan [Syncfusion]
Replied On November 19, 2019 12:44 PM UTC

Hi Uladzislau, 

We have checked your query and logged “Need to provide run time scroll (infinite scroll) option in Grid control” as a feature. It will be published in any of upcoming releases. We will inform you once the release rolled out successfully. Until then we appreciate your patience.  
  
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through the below link:   
   
Regards, 
Thavasianand S. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon