Closed izhamcheros closed 6 years ago
By default server paging will work as default.
Kendogridbinderex creates dynamic sql-queries and uses System.Linq.Dynamic.Core to execute the dynamic query on the database
If you open the example webpage https://kendogridbinderex.azurewebsites.net/Employee
And click the paging buttons, you can also view the generated SQL (right upper corner)
Navigating to 2nd page shows:
SELECT
[GroupBy1].[A1] AS [C1]
FROM ( SELECT
COUNT(1) AS [A1]
FROM [dbo].[KendoGrid_Employee] AS [Extent1]
) AS [GroupBy1];
and
SELECT
[Extent1].[Id] AS [Id],
[Extent1].[EmployeeNumber] AS [EmployeeNumber],
[Extent1].[FirstName] AS [FirstName],
[Extent1].[LastName] AS [LastName],
[Extent1].[Email] AS [Email],
[Extent1].[HireDate] AS [HireDate],
[Extent1].[Company_Id] AS [Company_Id],
[Extent1].[Country_Id] AS [Country_Id],
[Extent1].[Function_Id] AS [Function_Id],
[Extent1].[SubFunction_Id] AS [SubFunction_Id],
[Extent1].[Assigned] AS [Assigned]
FROM [dbo].[KendoGrid_Employee] AS [Extent1]
ORDER BY [Extent1].[EmployeeNumber] ASC
OFFSET 5 ROWS FETCH NEXT 5 ROWS ONLY ;
Thanks for the quick reply. I will try it out on the server. Currently, I'm running it remotely (codes running in Malaysia while the database server is in Prague). So in this case, the switch 'serverPaging: true' is not required at all, as I was looking at another project using the original Kendo UI before it was commercialized and I can see that it is being used.
there are other switches like serverSorting, serverFiltering, serverGrouping, and serverAggregates. Does these switches need methods to be defined in C#?
For a simple example, see https://github.com/StefH/KendoGridBinderEx/tree/master/examples/WebApplication.NETCore2
See this https://github.com/StefH/KendoGridBinderEx/tree/master/examples/KendoGridBinderEx.Examples.MVC for a more complex example.
Hi StefH,
I can confirm the serverPaging is working with the serverPaging switch enabled. Thanks a lot for your advice :).
Just another question, if I'm not mistaken, Kendo UI included support for Grid/Persist state for jQuery, Do we have it, or do you have any suggestion how it can be implemented throughout KendoGridBinder?
-Izham-
This project can only query and view data, no updates are possible.
Sorry for the so many questions. I'm really a newbie in programming and I really need help in completing this task in my office.
By the way, I've read somewhere that the Grid Persist can be managed using jQuery's getOption/setOption and I'll explore this option.
My grid is working right now except for sorting and filtering which I thought it should be available by default? When I clicked on the sorting button or try to apply the filtering, it looks like it is sending some request to the server but nothing happened. Is there any function/method that is being called when sorting/filtering is applied? From the examples, I can only see the autocomplete function but not sorting or filtering.
Thanks in advance. Really appreciate your help.
closing....
Hi. Since there is no complete documentation provided for this project, I just want to know if server paging is supported and how to enable it. I need to optimize data loading which is my main concern.
If there no such thing, would you recommend on how do we optimize data loading, for example we query just the 20 data out of 4000 that is needed to be shown on the page (which is sized at 20) but still return the total so the total pages is known to the grid.
I’m using kendogridbinder for c# mvc.
Thanks for your help.