Spread Windows Forms 6.0 Product Documentation
GetCustomNameEnumerator Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class : GetCustomNameEnumerator Method

Glossary Item Box

Gets an IEnumerator on this sheet that enumerates through the custom names defined in the model.


Visual Basic (Declaration) 
Public Function GetCustomNameEnumerator() As IEnumerator
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim value As IEnumerator
value = instance.GetCustomNameEnumerator()
public IEnumerator GetCustomNameEnumerator()

Return Value

IEnumerator object containing the enumerator for the custom name


This example illustrates the use of this member by returning the string value for a custom name from the sheet.
C#Copy Code
System.Collections.IEnumerator se;
fpSpread1.ActiveSheet.AddCustomName("TwiceSum", "2*SUM(A1,A2)", 1, 1);
fpSpread1.ActiveSheet.AddCustomName("TwiceProduct", "2*A1*A2", 2, 2);
fpSpread1.ActiveSheet.SetFormula(1, 1, "TwiceSum");
fpSpread1.ActiveSheet.SetFormula(2, 2, "TwiceProduct");
fpSpread1.ActiveSheet.SetValue(0, 0, 10);
fpSpread1.ActiveSheet.SetValue(1, 0, 10);
se = fpSpread1.ActiveSheet.GetCustomNameEnumerator();
listBox1.Items.AddRange(new Object[] {se.MoveNext().ToString(), se.Current.ToString(), se.MoveNext().ToString(), se.Current.ToString()});
Visual BasicCopy Code
Dim se As System.Collections.IEnumerator
FpSpread1.ActiveSheet.AddCustomName("TwiceSum", "2*SUM(A1,A2)", 1, 1)
FpSpread1.ActiveSheet.AddCustomName("TwiceProduct", "2*A1*A2", 2, 2)
FpSpread1.ActiveSheet.SetFormula(1, 1, "TwiceSum")
FpSpread1.ActiveSheet.SetFormula(2, 2, "TwiceProduct")
FpSpread1.ActiveSheet.SetValue(0, 0, 10)
FpSpread1.ActiveSheet.SetValue(1, 0, 10)
se = FpSpread1.ActiveSheet.GetCustomNameEnumerator()
ListBox1.Items.AddRange(New Object() {se.MoveNext().ToString(), se.Current().ToString(), se.MoveNext().ToString(), se.Current().ToString()})


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

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.