Spread for ASP.NET 9.0 Product Documentation
RemoveCustomName Method (ICustomNameSupport)
Example 


Name to remove
Removes a user-defined name from the model.
Syntax
'Declaration
 
Sub RemoveCustomName( _
   ByVal name As String _
) 
'Usage
 
Dim instance As ICustomNameSupport
Dim name As String
 
instance.RemoveCustomName(name)
void RemoveCustomName( 
   string name
)

Parameters

name
Name to remove
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()}));

private void Button1Click(object sender, System.EventArgs e)
{
    FarPoint.Web.Spread.Model.ICustomNameSupport cns;
    cns = FpSpread1.ActiveSheetView.DataModel;
    cns.RemoveCustomName("Alpha");
    FpSpread1.ActiveSheetView.Recalculate();
}
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()}))

Private Sub Button1Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim cns As FarPoint.Web.Spread.Model.ICustomNameSupport
    cns = FpSpread1.ActiveSheetView.DataModel
    cns.RemoveCustomName("Alpha")
    FpSpread1.ActiveSheetView.Recalculate()
End Sub
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

ICustomNameSupport Interface
ICustomNameSupport Members

 

 


Copyright © GrapeCity, inc. All rights reserved.