Server side control paging through data MVC vs Kendo UI

6 posts, 1 answers
  1. Gary
    Gary avatar
    9 posts
    Member since:
    Sep 2016

    Posted 10 Oct Link to this post

    I am fairly new to kendo UI and very new to MVC. We have an application written in kendo UI. I am concerned about the potential volume of data being transferred to the client side as datasets grow. I am thinking of making some of our current application MVC based if we can gain greater control over paging through grids.

    1) With kendo UI is it the case that the page brings back the whole result set, and then paging through is managed locally client side within the page?

    2) With MVC version of the grid is the data bound server side or is the whole dataset delivered to the browser and paging managed as per (1). Does this limit the amount the data transferred from server to client?

    3) With MVC version is there any mechanism that allows the paging to occur within the SQL statement to restrict the size of the result turned from the database server?

     

    Any pointers with this would be appreciated.

     

  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 12 Oct Link to this post

    Hello Gary,

    The UI for ASP.NET MVC Grid can be configured in many ways, however using Ajax Binding with ServerOperation(true) is most commonly used due to its excellent performance. Basically, the Grid relies on its DataSource to prepare a request asking the server only for the records that needs to be displayed given the current sorting, paging, filtering and etc criteria. Then, the server-side gets that requests and passes it to the ToDataSourceResult method, which translates it into SQL statements and executes them on database level. As a result, the Ajax response from the server contains only the requested method and no client-side operations are performed by the Grid.

    Regards,
    Alexander Popov
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Gary
    Gary avatar
    9 posts
    Member since:
    Sep 2016

    Posted 12 Oct in reply to Alexander Popov Link to this post

    Thanks for this Alexander. If you answer these points it would be helpful

    1) Does using the server side grid control give any greater control than if the UI was written in pure Kendo UI (in terms of whether a whole resultset of data gets passed to the client)? i.e. can the same control be achieved by writing a Kendo UI app as against an MVC grid in terms of the number of records passed to the browser?

    2) The potential result dataset from the database is 1000 rows and paging is set at 20 rows. In this case is SQL query adjusted to only bring back 20 rows from the database to the server or are 1000 rows returned to the server and then MVC grid decides which 20 of these 1000 rows are needed for the page?

  5. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 14 Oct Link to this post

    Hi,

    Both have pretty much the same level of control and both allow you to configure them in such way that either all records are sent to the browser or just a subset matching the current criteria.
    My previous reply also addressed the question regarding the database. Under normal circumstances, using a standard configuration the MVC wrappers will generate a code that requests only 20 of the 1000 records from the database. If for some reason you wish to pull all of the 1000 records and perform some operations in-memory instead, that can also be done.

    Regards,
    Alexander Popov
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Gary
    Gary avatar
    9 posts
    Member since:
    Sep 2016

    Posted 14 Oct in reply to Alexander Popov Link to this post

    Thanks again Alexander.

    Please could you point me to any resources and examples for the non-MVC route (i.e. purely Kendo UI development) for the configuration of data through ajax i.e. whether data is paging is determined client / server side and particularly the configuration of SQL statements to effect paging at the database.

     

    Thanks.

     

  7. Answer
    Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 18 Oct Link to this post

    Hi Gary,

    Where the filtering, paging and etc. operations are performed can be controlled through the DataSource's configuration options. Configuring the server-side however is a completely different topic, which is not directly related to Kendo UI, especially when not using the MVC wrappers.  

    Regards,
    Alexander Popov
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET MVC is VS 2017 Ready