group count in header client-side

2 posts, 0 answers
  1. Christian
    Christian avatar
    65 posts
    Member since:
    Apr 2008

    Posted 25 Mar 2011 Link to this post

    Ajax 2010.3.1317.45

    as mentioned in this article,

    I would like to have calculation (only group "count") on Any column being grouped. is there any way to accomplish this client-side, the reason for asking is that i use






    and dont want to set up groupfields for all columns, can i achieve this type of count aggrigation independent from what column is being grouped, maybe trough javascript?
  2. Marin
    Marin avatar
    1057 posts

    Posted 31 Mar 2011 Link to this post

    Hello Christian,

    The referred article suggests customization of the GridGroupHeaderItem showing various information about the grouped item. Unfortunately there is no straightforward client-side API that gets access to this elements so one option is to access them through jQuery like that. Note that you also need to manually calculate the proper aggregate value (count, sum) on the client.

    function pageLoad()
                        var grid = $find('<%= RadGrid1.ClientID %>');
                        var groupHeaders = $telerik.$(grid.get_masterTableView().get_element()).find('tr[class="rgGroupHeader"]');
                        if (groupHeaders.length > 0)
                            for (var i = 0; i < groupHeaders.length; i++)
                                var groupHeadertext = $telerik.$(groupHeaders[0]).find('p')[0].innerHTML;
                                //modify text in some way

    Best wishes,
    the Telerik team
Back to Top