Does Editor .NET do paging and server side filtering?

Does Editor .NET do paging and server side filtering?

rcheungrcheung Posts: 7Questions: 5Answers: 0

I've been using regular DataTables by using Entity Framework to retrieve all the data, serialize it to JSON, and passing it to DataTables on the client side to AJAX load the data. Then just using filtering on the client side.

I've been looking into server-side processing to do the filtering on the server and returning data that is filtered.

https://datatables.net/examples/data_sources/server_side.html

https://datatables.net/forums/discussion/40690/sample-implementation-of-serverside-processing-in-c-mvc-ef-with-paging-sorting-searching

If using the .NET library, does it do all the server-side filtering and paging too? That is, I can just initialize an Editor instance and not have to implement this https://datatables.net/forums/discussion/40690/sample-implementation-of-serverside-processing-in-c-mvc-ef-with-paging-sorting-searching ?

Thanks,

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin

    If using the .NET library, does it do all the server-side filtering and paging too?

    Do you mean the .NET libraries that Editor comes with? If so then yes, it will automatically do server-side processing for you. It doesn't use EF though - it uses ADO.NET for direct database access.

    Allan

  • rcheungrcheung Posts: 7Questions: 5Answers: 0

    So I tried the generator with .NET and it works good.

    But looking at the controller when it's being called, the response is returning everything (I have ~15,000 rows).

    It's still pretty fast but is that how it's supposed to be or do I enable paging somehow?

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin
    Answer ✓

    You enable server-side processing you need to change the ajax option in the DataTables configuration to use POST and also add the serverSide option.

    There is an example available here.

    Allan

This discussion has been closed.