Child control not binding if not selected

2 posts, 0 answers
  1. Voss Grose
    Voss Grose avatar
    81 posts
    Member since:
    Sep 2012

    Posted 15 Oct 2009 Link to this post

    When I create RadPanelBarItem dynamically and add a custom control(Grid) only the Grid that is a child of the Selected/Expanded RadPanelBarItem gets loaded.

    Once I click on a different RadPanelBarItem then the binding occurs. If I do not Select/Expand any RadPanelBarItem then none of the grid are pre-bound.



    loop start
    RadPanelBarItem rpbi = new
    rpbi.Header = shift.Title.ToUpper();
    rpbi.Name = shift.Title.ToUpper();
    rpbi.Tag = shift.Id.ToString();

    // Add Custom Reservation UserControl as a child to the RadPanelBarItem (rpbi)
    ucReservationGrid grid = new ucReservationGrid();
    grid.HorizontalAlignment = HorizontalAlignment.Center;
    grid.VerticalAlignment = VerticalAlignment.Center;

    // Load the Data

    loop end

  2. Tihomir Petkov
    Tihomir Petkov avatar
    576 posts

    Posted 19 Oct 2009 Link to this post

    Hello Voss,

    What you observe is the expected behavior. A UI element that is not visible (e.g. the items of a RadPanelBarItem that is collapsed) will not be initialized and any bindings regarding that element will not occur until the element needs to be rendered. The above is true for the Silverlight platform as a whole and is not specific to RadControls for Silverlight.

    I hope I was able to help. Let me know if you have other questions.

    Sincerely yours,
    Tihomir Petkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top