Empty child tables when HierarchyDefaultExpanded=true

4 posts, 0 answers
  1. Dan Pettersson
    Dan Pettersson avatar
    20 posts
    Member since:
    Sep 2009

    Posted 15 Sep 2009 Link to this post

    I have created a hierarchical grid with one sublevel. I want all the child tables visible from start so I've set the

    HierarchyDefaultExpanded = true.

    When I do this, all the items are expanded but the child tables are empty. Not even the "No child records to display" is there, it's just plain empty.

    If I remove the HierarchyDefaultExpanded = true it works as expected, I can manually expand each item of the mastertable, and the child records will display.

    Does anyone know what more steps I have to take to have all subtables displayed with data on page load?

     

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 15 Sep 2009 Link to this post

    Hi Dan,

    I tried with the HierarchyDefaultExpanded property and the detail tables are shown as expected. I am not sure about what is happening on your end. Are you binding the Grid using AdvanceDataBinding techniques? Because hierarchical grid structure is not supported with simple data-binding (calling DataBind()).
    Advanced Data Binding

    Thanks
    Princy
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Dan Pettersson
    Dan Pettersson avatar
    20 posts
    Member since:
    Sep 2009

    Posted 15 Sep 2009 Link to this post

    Yes, the grid is bound through the NeedDataSource-event...
  5. Dan Pettersson
    Dan Pettersson avatar
    20 posts
    Member since:
    Sep 2009

    Posted 24 Sep 2009 Link to this post

    Found the error when working with a different grid.

    The situation that gave me the error was that I bound the mastertableview through the NeedDataSource-event and the detailtables through an ObjectDataSource.

    Changing so that both of them uses ObjectDataSource made the

    HierarchyDefaultExpanded=true

    work.
Back to Top