This is a migrated thread and some comments may be shown as answers.

Child control not binding if not selected

1 Answer 31 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Voss Grose
Top achievements
Rank 1
Voss Grose asked on 15 Oct 2009, 06:06 PM
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.

Thanks,

Example:

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
rpbi.Items.Add(grid);
grid.Load(shift);

loop end

1 Answer, 1 is accepted

Sort by
0
Tihomir Petkov
Telerik team
answered on 19 Oct 2009, 10:20 AM
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.
Tags
PanelBar
Asked by
Voss Grose
Top achievements
Rank 1
Answers by
Tihomir Petkov
Telerik team
Share this question
or