Spread ASP.NET 17
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread Namespace / AlternatingRow Class / Margin Property
Example


In This Topic
    Margin Property (AlternatingRow)
    In This Topic
    Gets or sets the default settings of the cell margins that define the space between the cell border and the cell contents, for all the cells in this alternating row.
    Syntax
    'Declaration
     
    
    Public Property Margin As Inset
    'Usage
     
    
    Dim instance As AlternatingRow
    Dim value As Inset
     
    instance.Margin = value
     
    value = instance.Margin
    public Inset Margin {get; set;}

    Property Value

    Inset object containing the margins for the contents of the cells in this alternating row
    Remarks

    The setting for this property can be overridden if a named style is assigned to the cell using the StyleName property, and that named style sets the margins.

    Example
    This example creates three alternating rows, adjusts the height of the rows and sets up an Inset, which allows the text in the cell to be indented to the specified margin.
    FarPoint.Web.Spread.Inset inset=new FarPoint.Web.Spread.Inset(35,5,5,35);
    FpSpread1.Sheets[0].AlternatingRows.Count=3;
    FpSpread1.Sheets[0].Rows[0].Height=80;
    FpSpread1.Sheets[0].Rows[1].Height=80;
    FpSpread1.Sheets[0].Rows[2].Height=80;
    FpSpread1.Sheets[0].SetValue(0,0,"Test");
    FpSpread1.Sheets[0].SetValue(1,0,"for");
    FpSpread1.Sheets[0].SetValue(2,0,"Margin");
    FpSpread1.Sheets[0].AlternatingRows[0].Margin=inset;
    FpSpread1.Sheets[0].AlternatingRows[1].Margin=inset;
    FpSpread1.Sheets[0].AlternatingRows[2].Margin=inset;
    Dim inset As New FarPoint.Web.Spread.Inset(35,5,5,35)
    FpSpread1.Sheets(0).AlternatingRows.Count=3
    FpSpread1.Sheets(0).Rows(0).Height=80
    FpSpread1.Sheets(0).Rows(1).Height=80
    FpSpread1.Sheets(0).Rows(2).Height=80
    FpSpread1.Sheets(0).SetValue(0,0,"Test")
    FpSpread1.Sheets(0).SetValue(1,0,"for")
    FpSpread1.Sheets(0).SetValue(2,0,"Margin")
    FpSpread1.Sheets(0).AlternatingRows(0).Margin=inset
    FpSpread1.Sheets(0).AlternatingRows(1).Margin=inset
    FpSpread1.Sheets(0).AlternatingRows(2).Margin=inset
    See Also