Expand only higher level group

2 posts, 0 answers
  1. NVB
    NVB avatar
    39 posts
    Member since:
    Apr 2009

    Posted 01 Jun 2012 Link to this post

    I have  radgrid  which  displays information on 2 grouping levels
    Based on selction from dropdown  above the radgrid, it retrieves the  Radgrid.

    On first load of the page or whenever there is change in the selection in the search drop down. I need the Group1 not to  expand and  user should able to expand the group  which should result the groups inside it  and then  expand I should able to expand the 2nd group again.

    I was  able to to do the following  in the load


    If
    Not IsPostBack Then

     RadGrid1.MasterTableView.GroupsDefaultExpanded = False

    Else

     RadGrid1.MasterTableView.GroupsDefaultExpanded = True   <--- I have to do this otherwise it stays FALSE on subsequest page loads

    End If

    And on the change selection of dropdown I am doing

     

    RadGrid1.MasterTableView.GroupsDefaultExpanded = FALSE

    With the above codigng  the first load of grid  displays fine with not expanded , when i click on the group expand button, the symbol changes that it expanded but it does not display the expanded groups. Now If I clcik again the same buttons ,it shows  everything with all 2 level groups also  expanded .
    So basically on  1st time you don't see any change in the display of screen ( except the higher level group shows expanded sysmbol).
    Clicking on it agian  it shows everything expanded.

    How to control the two level groupings for the scenario I mentioned above.

    Thanks
     



  2. Tsvetina
    Admin
    Tsvetina avatar
    2448 posts

    Posted 06 Jun 2012 Link to this post

    Hello,

    It is not expected behavior for the grid to not expand on initial clicking of the expand button. Can you confirm if you have AJAX in this scenario and if so, do you get any server-side exceptions when you temporarily disable it in this scenario?
    Also, how are you binding the grid? Can you share the code related to this problem - grid declaration, binding logic, etc.?

    Greetings,
    Tsvetina
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top