- Home
- Forum
- Angular - EJ 2
- Grid events subscriptions
Grid events subscriptions
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.
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
Thank you in advance,
Ulad
SIGN IN To post a reply.
5 Replies
TS
Thavasianand Sankaranarayanan
Syncfusion Team
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.
Please get back to us if you need further assistance.
Regards,
Thavasianand S.
US
Uladzislau Sipaila
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
Regards,
Ulad
TS
Thavasianand Sankaranarayanan
Syncfusion Team
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
}
}
} |
Help Documentation: https://ej2.syncfusion.com/angular/documentation/api/grid/#actionbegin
Please get back to us if you need further assistance.
Regards,
Thavasianand S.
KS
Katsiaryna Sachko
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
Thank you in advance,
Katsja
TS
Thavasianand Sankaranarayanan
Syncfusion Team
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.
SIGN IN To post a reply.
- 5 Replies
- 3 Participants
-
US Uladzislau Sipaila
- Oct 7, 2019 12:25 PM UTC
- Nov 19, 2019 12:44 PM UTC