Spread for ASP.NET 8.0 Product Documentation
GetCustomNameEnumerator Method (ICustomNameSupport)
Example 


Gets an IEnumerator that enumerates through the custom names defined in the model.
Syntax
'Declaration
 
Function GetCustomNameEnumerator() As IEnumerator
'Usage
 
Dim instance As ICustomNameSupport
Dim value As IEnumerator
 
value = instance.GetCustomNameEnumerator()
IEnumerator GetCustomNameEnumerator()
Remarks
IEnumerator containing the custom name enumerator
Example
System.Collections.IEnumerator se;
FarPoint.Web.Spread.Model.ICustomNameSupport cns;
cns = FpSpread1.ActiveSheetView.DataModel;
cns.AddCustomName("ALPHA", "SUM(A1,A2)", 1, 1);
cns.AddCustomName("GAMMA", "A1*A2", 2, 2);
FpSpread1.ActiveSheetView.SetFormula(1, 1, "ALPHA");
FpSpread1.ActiveSheetView.SetFormula(2, 2, "GAMMA");
FpSpread1.ActiveSheetView.SetValue(0, 0, 10);
FpSpread1.ActiveSheetView.SetValue(1, 0, 10);
se = cns.GetCustomNameEnumerator();
Response.Write((new Object[] {se.MoveNext().ToString(), se.Current().ToString()}));
Dim se As System.Collections.IEnumerator
Dim cns As FarPoint.Web.Spread.Model.ICustomNameSupport
cns = FpSpread1.ActiveSheetView.DataModel
cns.AddCustomName("ALPHA", "SUM(A1,A2)", 1, 1)
cns.AddCustomName("GAMMA", "A1*A2", 2, 2)
FpSpread1.ActiveSheetView.SetFormula(1, 1, "ALPHA")
FpSpread1.ActiveSheetView.SetFormula(2, 2, "GAMMA")
FpSpread1.ActiveSheetView.SetValue(0, 0, 10)
FpSpread1.ActiveSheetView.SetValue(1, 0, 10)
se = cns.GetCustomNameEnumerator()
Response.Write((New Object() {se.MoveNext().ToString(), se.Current().ToString()}))
Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

ICustomNameSupport Interface
ICustomNameSupport Members

 

 


Copyright © GrapeCity, inc. All rights reserved.