Gets the name of the direct style assigned to a cell, column, row, or model default.
Syntax
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
Return Value
String containing the name of the style for the specified cell, column, row, or model default, or an empty string if the specified cell, column, row, or model default has no named style assigned.
Remarks
Example
This example returns the name of the named style used to change the background color of a cell.
C# | Copy Code |
---|
FarPoint.Win.Spread.Model.INamedStyleSupport ins;
FarPoint.Win.Spread.NamedStyle ns = new FarPoint.Win.Spread.NamedStyle("StyleData");
ns.BackColor = Color.LightBlue;
fpSpread1.NamedStyles.Add(ns);
ins = (FarPoint.Win.Spread.Model.INamedStyleSupport)fpSpread1.ActiveSheet.Models.Style;
ins.SetDirectName(1, 1, "StyleData");
label1.Text = "The name of the style used to change the color in the cell is " + ins.GetDirectName(1, 1).ToString(); |
Visual Basic | Copy Code |
---|
Dim ins As FarPoint.Win.Spread.Model.INamedStyleSupport
Dim ns As New FarPoint.Win.Spread.NamedStyle("StyleData")
ns.BackColor = Color.LightBlue
FpSpread1.NamedStyles.Add(ns)
ins = FpSpread1.ActiveSheet.Models.Style
ins.SetDirectName(1, 1, "StyleData")
Label1.Text = "The name of the style used to change the color in the cell is " & ins.GetDirectName(1, 1).ToString() |
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
See Also