Expanding all NestedViewTemplates when grouped client-side

4 posts, 0 answers
  1. Condorito
    Condorito avatar
    38 posts
    Member since:
    Mar 2009

    Posted 05 May 2009 Link to this post


    I have a Rad Grid with a NestedViewTemplate that can be expanded/collapsed client-side.  One of the requirements for this grid is to also be able to expand/collapse all NestedViewTemplates in the Grid client-side with the event raised by an external control, which I can do easily with this code that I found here in an earlier thread:

    function expandCollapseAll(expand) { 
                    var grid = $find("<%=rgDomestic.ClientID %>"); 
                    var table = grid.get_masterTableView(); 
                    var rows = table.get_dataItems(); 
                    for (var i = 0; i < rows.length; i++) { 
                        var Row = rows[i]; 
                        if (expand == true) { 
                        else { 

    The problem is that I also have a requirement that the grid needs to have grouping-by-column ability (also done on the client-side).  However, when the grid is grouped by a column or columns, the code above no longer works and gives me the following error message when it hits the line below, 'title' is null or not an object:


    Is there any way I can expand or collapse all nestedviewtemplates with an external control client-side when the Rad Grid has been grouped by a column?  Thank you.
  2. Condorito
    Condorito avatar
    38 posts
    Member since:
    Mar 2009

    Posted 06 May 2009 Link to this post

    Any thoughts on this?   Thanks...
  3. Seth
    Seth avatar
    90 posts
    Member since:
    Jun 2007

    Posted 06 May 2009 Link to this post

    Yes, I too have a need for this functionality client-side.
  4. Sebastian
    Sebastian avatar
    9934 posts

    Posted 08 May 2009 Link to this post

    Hello guys,

    I suggest you try out the approach presented in the sample project from this code library thread. It should be applicable for NestedView templates, too.

    Best regards,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top