SPRibbonScriptManager.RegisterCommandEnabledFunction method

Registers an ECMAScript function that returns true if the specified commands are enabled; otherwise, false.

Namespace:  Microsoft.SharePoint.WebControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Sub RegisterCommandEnabledFunction ( _
    control As Control, _
    functionName As String, _
    commands As IEnumerable(Of IRibbonCommand) _
)
'Usage
Dim instance As SPRibbonScriptManager
Dim control As Control
Dim functionName As String
Dim commands As IEnumerable(Of IRibbonCommand)

instance.RegisterCommandEnabledFunction(control, _
    functionName, commands)
public void RegisterCommandEnabledFunction(
    Control control,
    string functionName,
    IEnumerable<IRibbonCommand> commands
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

control is a null reference (Nothing in Visual Basic).

functionName is a null reference (Nothing in Visual Basic).

See also

Reference

SPRibbonScriptManager class

SPRibbonScriptManager members

Microsoft.SharePoint.WebControls namespace