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

Implement own custom server side external filter using angular js .

1 Answer 95 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 1
Sean asked on 25 Aug 2016, 10:23 AM

I have implement grid finally. Previously I could do it with less effort but now by using angular js, it has become really painful. I have posted code. I have my api to load data and api expects parameters. I cannot change api's parameter to  make it inline with the kendoGrid's request object. So I have created own view model and assigned the required parameters.

Current status:

-Data is rendered in the grid.

-Pagination works perfectly.

-Sorting also works but sort is not initialized on one click. I am wondering if there is change function for sort option like it has for pageable. Since I have assigned sort's values to my viewmodel in change() under DataSource, this changes the viewmodel's sort value after grid load. This is of no use for the first time. I have no idea where I am suppose to implement that....

Problems to be addressed:

-I would like to implement the custom filter on the grid rather than the one provided by the grid itself.

-and the sorting problem as mentioned above. 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 26 Aug 2016, 10:22 AM
Hello Sean,

Regarding the two questions:

1) Custom filter.
 
Custom filter can be implemented by using the filter method of the Kendo UI DataSource:

http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#methods-filter

Additionally, I can suggest checking the following thread on our forum:

http://www.telerik.com/forums/custom-filtering-7b617857877c

2) Sorting issue: 

I can assume that when the Grid is loaded the custom sorting is not applied. If my assumption is correct, please use the sort property of the DataSource to sort the Grid when it is initialized:

http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-sort

Let me know if you need more information on this matter.

Regards,
Stefan
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Grid
Asked by
Sean
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or