ComponentOne ASP.NET MVC Controls
ManualGridLayout Class
Members  Example 

C1.Web.Mvc Namespace : ManualGridLayout Class
Defines a class represents the manual grid layout, in which the items rendered in the specified position.
Syntax
'Declaration
 
Public Class ManualGridLayout 
   Inherits GridLayout
   Implements ITemplate 
public class ManualGridLayout : GridLayout, ITemplate  
Remarks

The ManualGridLayout class is used to define the ManualGridLayout for the DashboardLayout control,  in which the position of the tiles is explicitly specified by the row and column index. The following options for the layout can be set using the properties of this class:

1. The layout orientation can be set to horizontal or vertical using the Orientation property.

2. The groups which are of type ManualGridGroup class, are added using the Add method of the ListItemFactory class and can be retrieved using the Items property of this class.

3. Each group is split into multiple rows and columns based on the value set for the MaxRowOrColumns property.

4. The CellSize property is used to define the size of the cells, while the CellSpacing and GroupSpacing properties are used to define space between the cells in each group and the space between the groups respectively.

Example
@(Html.C1().DashboardLayout()
    .AttachManualGridLayout(mglb => mglb.Orientation(LayoutOrientation.Vertical)
        .MaxRowsOrColumns(3)
        .CellSize(303)
        .Items(isb =>
        {
            isb.Add().Children(cb =>
            {
                cb.Add().HeaderText("Category Sales")
                    .Content("#CategorySales")
                    .RowSpan(1).ColumnSpan(1);
                cb.Add().HeaderText("Products Stock")
                    .Content("#ProductsStock")
                    .RowSpan(1).ColumnSpan(1)
                    .Row(4).Column(3);
                cb.Add().HeaderText("Products Stock")
                    .Content("#ProductsStock")
                    .RowSpan(1).ColumnSpan(1)
                    .Row(4).Column(4);
            });
            isb.Add().Children(cb =>
            {
                cb.Add().HeaderText("Product Details")
                    .Content("#ProductDetails")
                    .RowSpan(1).ColumnSpan(2)
                    .Row(1).Column(2);
            });
        })))
Inheritance Hierarchy

System.Object
   C1.Web.Mvc.Component
         C1.Web.Mvc.LayoutBase
            C1.Web.Mvc.GridLayout
               C1.Web.Mvc.ManualGridLayout

See Also

Reference

ManualGridLayout Members
C1.Web.Mvc Namespace