Spread Windows Forms 7.0 Product Documentation
ModifyModelScopeCustomName Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > DefaultSheetDataModel Class : ModifyModelScopeCustomName Method


name
Name of the custom name to modify
newName
New name of the custom name to modify

Glossary Item Box

Modifies the name of a model scope custom name.

Syntax

Visual Basic (Declaration) 
Public Function ModifyModelScopeCustomName( _
   ByVal name As String, _
   ByVal newName As String _
) As Boolean
Visual Basic (Usage)Copy Code
Dim instance As DefaultSheetDataModel
Dim name As String
Dim newName As String
Dim value As Boolean
 
value = instance.ModifyModelScopeCustomName(name, newName)
C# 
public bool ModifyModelScopeCustomName( 
   string name,
   string newName
)

Parameters

name
Name of the custom name to modify
newName
New name of the custom name to modify

Return Value

true if name is modified; otherwise, false

Example

This example uses the ModifyModelScopeCustomName method.
C#Copy Code
FarPoint.Win.Spread.Model.DefaultSheetDataModel modelScopeCustomNameSupportModel = new FarPoint.Win.Spread.Model.DefaultSheetDataModel(5, 5);
FarPoint.CalcEngine.Expression exp = new FarPoint.CalcEngine.NameExpression("Jeff");
modelScopeCustomNameSupportModel.AddModelScopeCustomName("Joe", exp, ""); //add customName Joe 
FarPoint.CalcEngine.Expression exp1 = new FarPoint.CalcEngine.CellExpression(0, 0);
modelScopeCustomNameSupportModel.AddCustomName("Jeff", exp1); //add custom name Jeff 
modelScopeCustomNameSupportModel.ModifyModelScopeCustomName("Jeff", "Ken"); //modify name from Jeff to Ken 
VB.NETCopy Code
Dim modelScopeCustomNameSupportModel As New FarPoint.Win.Spread.Model.DefaultSheetDataModel(5, 5)
Dim exp As FarPoint.CalcEngine.Expression = New FarPoint.CalcEngine.NameExpression("Jeff")
modelScopeCustomNameSupportModel.AddModelScopeCustomName("Joe", exp, "")
 'add customName Joe 
Dim exp1 As FarPoint.CalcEngine.Expression = New FarPoint.CalcEngine.CellExpression(0, 0)
modelScopeCustomNameSupportModel.AddCustomName("Jeff", exp1)
 'add custom name Jeff 
modelScopeCustomNameSupportModel.ModifyModelScopeCustomName("Jeff", "Ken")
'modify name from Jeff to Ken 

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

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