This is a migrated thread and some comments may be shown as answers.

Data source change getting called twice using server side sorting

1 Answer 1242 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Abhishek
Top achievements
Rank 1
Abhishek asked on 31 Oct 2014, 05:31 PM
Hi,

 We use server side paging/sorting for grid and do not use datasource transport methods but make server calls to bind data ourselves. Now when user clicks sort, data source change event is fired, there we check if sort options have changed. If yes, we get the sorted data and when data is returned from server, we bind the data to the grid. This again calls datasource change event. 
 Can you please tell us if this is expected, or we are missing anything here.

Thanks a lot.

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 04 Nov 2014, 12:58 PM
Hi Abhishek,

The behaviour is expected. The change event of the DataSource is triggered every time any change in the data occurs. The first it is triggered by the user when he/she sorts with the mouse. The second time it is triggered because the data is changed by the developer.

Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Abhishek
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or