Custom aggregates with paging

3 posts, 0 answers
  1. Mark
    Mark avatar
    3 posts
    Member since:
    May 2011

    Posted 15 Jun Link to this post


    We have run into an issue regarding custom footer templates in combination with paging. We have an MVC grid with an Ajax datasource and clientside filtering. So we return a few thousands rows from our controller action, and let the grid control the paging and filtering. So far so good...

    However we'd like to add an aggregate for standard deviation. We know how to pass cell values through a javascript function from a ClientTemplate and ClientFooterTemplate. However as you can guess, these functions do only get called for the items on the current page. So our stddev is based on 500 items only (our page size) instead of the complete grid.

    Question: since the grid control itself is able to access all of its items while building up the default aggregates (count,min/max etc.) is there a way for us to access these non-visible items as well?

    We tried to look at the client grid.dataSource, but this only includes the items on the page. Or is there a property we have overlooked? All items must be somewhere since the grid has uses them too, right?

    We'd like to know our options before deciding to move to server side filtering, because that's quite a change from how we envisioned our app to work..

    Thanks in advance!



  2. Tsvetina
    Tsvetina avatar
    2102 posts

    Posted 19 Jun Link to this post

    Hi Mark,

    If you are returning the full set of data into the DataSource, then you should be able to access it using the data() method of the DataSource, as opposed to the view() method, which only returns the current page of data. If the data() method does not return the entire data, then check again the response from your controller method to confirm that indeed all records are returned. 
    If the problem with accessing all items persists, please show us the DataSource definition.

    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Mark
    Mark avatar
    3 posts
    Member since:
    May 2011

    Posted 05 Jul in reply to Tsvetina Link to this post

    Thanks Tsvetina,

    I am indeed able to get all the data now. I should be fine from here.

    Sorry for late reply, i was out of office for a while.

    Best regards

Back to Top