The following example demonstrates how to change a layout of the specified group in code.
In this example, the ASPxDashboardViewer loads an existing dashboard with the predefined layout from an XML file. The bottom group contains three dashboard items that are placed horizontally side-by-side.
In this example, the ASPxDashboardViewer loads an existing dashboard with the predefined layout from an XML file. The bottom group contains three dashboard items that are placed horizontally side-by-side.
The following steps are performed to customize a group layout:
- Three layout items corresponding to existing dashboard items are obtained using the FindRecursive method. The Weight property specifies the layout item size.
- Child items contained within the bottom group are removed using the RemoveRange method.
- A new layout group is created to display the Combo Box and List Box filter elements. The orientation parameter specifies the orientation of layout items within this group.
- A newly created group and layout item displaying the Chart dashboard item are added to the ChildNodes collection.