Spread ASP.NET 14
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread.Model Namespace / ISheetStyleModel Interface / SetDirectInfo Method
Row index of the cell in the model, or -1 to specify an entire column or the model default
Column index of the cell in the model, or -1 to specify an entire row or the model default
Style set (StyleInfo object)
Example


In This Topic
    SetDirectInfo Method (ISheetStyleModel)
    In This Topic
    Sets the direct style for the specified cell, column, row, or model default.
    Syntax
    'Declaration
     
    Sub SetDirectInfo( _
       ByVal row As Integer, _
       ByVal column As Integer, _
       ByVal info As StyleInfo _
    ) 
    'Usage
     
    Dim instance As ISheetStyleModel
    Dim row As Integer
    Dim column As Integer
    Dim info As StyleInfo
     
    instance.SetDirectInfo(row, column, info)
    void SetDirectInfo( 
       int row,
       int column,
       StyleInfo info
    )

    Parameters

    row
    Row index of the cell in the model, or -1 to specify an entire column or the model default
    column
    Column index of the cell in the model, or -1 to specify an entire row or the model default
    info
    Style set (StyleInfo object)
    Example
    FarPoint.Web.Spread.Model.ISheetStyleModel iss;
    iss = (FarPoint.Web.Spread.Model.ISheetStyleModel)FpSpread1.ActiveSheetView.StyleModel;
    iss.AltRowCount = 2;
    Dim si As New FarPoint.Web.Spread.StyleInfo;
    si.BackColor = Color.Yellow;
    iss.SetDirectAltRowInfo(1, si);
    iss.SetDirectInfo(1, 1, si)
    FarPoint.Web.Spread.StyleInfo ret = iss.GetDirectInfo(1, 1, null);
    string msg = "The background color of the style is " + si.BackColor.ToString();
    Response.Write("<script language='javascript'>alert('" + msg + "')</script>");
    
    Dim iss As FarPoint.Web.Spread.Model.ISheetStyleModel
    iss = FpSpread1.ActiveSheetView.StyleModel
    iss.AltRowCount = 2
    Dim si As New FarPoint.Web.Spread.StyleInfo
    si.BackColor = Color.Yellow
    iss.SetDirectAltRowInfo(1, si)
    iss.SetDirectInfo(1, 1, si)
    Dim ret As FarPoint.Web.Spread.StyleInfo = iss.GetDirectInfo(1, 1, Nothing)
    Dim msg As String = "The background color of the style is " + si.BackColor.ToString()
    Response.Write("<script language='javascript'>alert('" & msg & "')</script>")
    See Also