Spread for ASP.NET 10 Product Documentation
IndexOf Method (DefaultStyleCollection)
Example 


Style (NamedStyle object) for which to search
Returns the index of the specified NamedStyle object.
Syntax
'Declaration
 
Public Function IndexOf( _
   ByVal style As NamedStyle _
) As Integer
'Usage
 
Dim instance As DefaultStyleCollection
Dim style As NamedStyle
Dim value As Integer
 
value = instance.IndexOf(style)
public int IndexOf( 
   NamedStyle style
)

Parameters

style
Style (NamedStyle object) for which to search

Return Value

Index of the object in the collection, or -1 if the object was not found
Remarks
This method returns the index of the style (NamedStyle object) in the collection of styles.
Example
FarPoint.Web.Spread.DefaultStyleCollection dsc = new FarPoint.Web.Spread.DefaultStyleCollection();
FarPoint.Web.Spread.NamedStyle ns = new FarPoint.Web.Spread.NamedStyle();
int i;
int i;    
foreach(FarPoint.Web.Spread.NamedStyle ns in dsc)
{
    i = dsc.IndexOf(ns);
    dsc[i].BackColor = Color.Yellow;
}
Dim dsc As New FarPoint.Web.Spread.DefaultStyleCollection
Dim ns As New FarPoint.Web.Spread.NamedStyle
Dim i As Integer
For Each ns In dsc.Styles
    i = dsc.IndexOf(ns)
    dsc.Item(i).BackColor = Color.Yellow
Next
Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

DefaultStyleCollection Class
DefaultStyleCollection Members

 

 


Copyright © GrapeCity, inc. All rights reserved.