Grooper.NodeView

Node Views are administrative user interfaces which display as tabs in Grooper Design Studio as nodes are selected from the Grooper tree structure. Custom Node View controls must must include an AppliesTo and DisplayName attributes. The Custom Node View will be displayed in Grooper Design Studio, when a Grooper Node of the type indicated in the AppliesTo attribute is selected, as a tab named using the display name indicated by the DisplayName attribute.


Inherits from: Grooper.GrooperControl

Constructors

Signature Description
New ()

Fields

Field Name Field Type Description
Advanced As System.String System.String
Contents As System.String System.String
General As System.String System.String
IsActive As System.Boolean System.Boolean
Node As Grooper.GrooperNode Grooper.GrooperNode
Scripting As System.String System.String

Properties

Property Name Property Type Description
Ancestors System.Collections.Generic.IEnumerable(Of T) Enumerates the parent controls of this control.

Methods

Method Name Description
Cancel() Discards all changes and reloads the node from the database.
CanClose() As Boolean Returns true if the control is in a state where it can be closed, or false if the control is busy and cannot be closed.
CanCloseTab() As Boolean Returns true if the control is in a state where it can be closed, or false if the control is busy and cannot be closed.
CanLeave() As Boolean Returns true if the user is allowed to leave the tab.
Clear() Resets the control back to an uninitialized state.
CreateMenuItem(Database As GrooperDb, Items As IEnumerable, CommandType As Type, Handler As EventHandler, ContextInstance As Object) As ToolStripMenuItem Creates a ToolStripMenuItem for a specific command type, if the command is enabled for a list of selected objects.
Parameters
Database
          Type: GrooperDb
          The Grooper database.
 
Items
          Type: IEnumerable
          The list of selected objects.
 
CommandType
          Type: Type
          A type deriving from ObjectCommand.
 
Handler
          Type: EventHandler
          The "Click" event handler to be wired up to the menu item.
 
ContextInstance
          Type: Object
          An optional context instance.
CreateMenuItems(Database As GrooperDb, CommandTypes As IEnumerable(Of Type), Items As IEnumerable, Handler As EventHandler) As List(Of ToolStripMenuItem) Creates a list ToolStripMenuItems from a list of command types, returning one ToolStripMenuItem for each enabled command.
Parameters
Database
          Type: GrooperDb
          The Grooper database.
 
CommandTypes
          Type: IEnumerable`1
          A list types deriving from ObjectCommand.
 
Items
          Type: IEnumerable
          The list of selected objects.
 
Handler
          Type: EventHandler
          The "Click" event handler to be wired up to the menu item.
CreateToolStripButtons(Database As GrooperDb, CommandTypes As IEnumerable(Of Type), Items As IEnumerable, Handler As EventHandler) As IEnumerable(Of ToolStripButton) Creates a list ToolStripButtons from a list of command types, returning one ToolStripButton for each enabled command.
Parameters
Database
          Type: GrooperDb
          The Grooper database.
 
CommandTypes
          Type: IEnumerable`1
          A list types deriving from ObjectCommand.
 
Items
          Type: IEnumerable
          The list of selected objects.
 
Handler
          Type: EventHandler
          The "Click" event handler to be wired up to the button.
DisplayNode(Node As GrooperNode) Displays the specified node.
Parameters
Node
          Type: GrooperNode
          
GetControlCommandTypes(ObjectType As Type, RepositoryId As Guid) As IEnumerable(Of Type) Returns a list of object commands which apply to a specific object type within the context of this control.
Parameters
ObjectType
          Type: Type
          The object type.
 
RepositoryId
          Type: Guid
          The GUID ID of the Grooper repository.
GetNodeViewTypes(NodeType As Type, RepositoryId As Guid) As List(Of Type)
Parameters
NodeType
          Type: Type
          
 
RepositoryId
          Type: Guid
          
Initialize() Called when the control is created. Override this method to perform initialization of the control.
InitToolbar()
NavigateTo(TargetId As Guid) Navigates the tree browser to the node with a specific ID.
Parameters
TargetId
          Type: Guid
          
OnActivate() Called when the control receives the input focus. In Grooper Design Studio, this occurs when the tab containing the control is activated.
OnClose() Called when the control is being closed. Override this method to perform any actions required before the control is destroyed.
OnDeActivate() Called when the control loses the input focus. In Grooper Design Studio, this occurs when the tab containing the control is deactivated.
Save() As Boolean Validates properties and saves the node.
SetCommandStates() Override this method to specify logic for enabling and disabling UI controls. This method is call automatically on initialization, and can be called directly from NodeView implementations to update UI controls in response to events. NOTE: Implementations should always call MyBase.SetCommandStates().
ShowValidationErrors(Items As ValidationErrorList, AllowInvalid As Boolean) As Boolean
Parameters
Items
          Type: ValidationErrorList
          
 
AllowInvalid
          Type: Boolean
          
ValidateControlValues() As Boolean Validates property values and returns true or false indicating the node is OK to save.
ValidateNode() As ValidationErrorList Called when the properties of the node should be validated. Override this method to provide custom validation error messages. The default behavior is to call ValidateProperties() on the node.
ValidateObject(Item As GrooperObject, AllowInvalid As Boolean) As Boolean
Parameters
Item
          Type: GrooperObject
          
 
AllowInvalid
          Type: Boolean
          
ValidateProperties() As ValidationErrorList