Spread ASP.NET 6.0 Product Documentation
GetDirectName Method
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Model Namespace > INamedStyleSupport Interface : GetDirectName Method


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

Glossary Item Box

Gets the name of the direct style assigned to a cell, column, row, or model default.

Syntax

Visual Basic (Declaration) 
Function GetDirectName( _
   ByVal row As Integer, _
   ByVal column As Integer _
) As String
Visual Basic (Usage)Copy Code
Dim instance As INamedStyleSupport
Dim row As Integer
Dim column As Integer
Dim value As String
 
value = instance.GetDirectName(row, column)
C# 
string GetDirectName( 
   int row,
   int column
)

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 style name

Example

This example returns the name of the style used by the style model.
C#Copy Code
FarPoint.Web.Spread.Model.INamedStyleSupport ins; 
FarPoint.Web.Spread.NamedStyle ns = new FarPoint.Web.Spread.NamedStyle("StyleData"); 
ns.BackColor = Color.LightBlue; 
FpSpread1.NamedStyles.Add(ns); 
ins = (FarPoint.Web.Spread.Model.INamedStyleSupport)FpSpread1.ActiveSheetView.StyleModel; 
ins.SetDirectName(1, 1, "StyleData"); 
Response.Write("The name of the style used to change the color in the cell is " + ins.GetDirectName(1, 1).ToString()); 
Visual BasicCopy Code
Dim ins As FarPoint.Web.Spread.Model.INamedStyleSupport
Dim ns As New FarPoint.Web.Spread.NamedStyle("StyleData")
ns.BackColor = Color.LightBlue
FpSpread1.NamedStyles.Add(ns)
ins = FpSpread1.ActiveSheetView.StyleModel
ins.SetDirectName(1, 1, "StyleData")
Response.Write("The name of the style used to change the color in the cell is " & ins.GetDirectName(1, 1).ToString())

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.