Autodesk Vault ProfessionalVault API

Validate Property

Autodesk.DataManagement.Client.Framework.Vault.Forms.SettingsSelectEntitySettings.SelectEntityOptionsExtensibility

Gets or sets the validation delegate. If provided, this is called when the action button is clicked before the form is closed.

Syntax

public System.Func<SelectEntityResults,bool> Validate {get; set;}
Public Property Validate As System.Func(Of SelectEntityResults,Boolean)

Remarks

The arguement to the function is the same Autodesk.DataManagement.Client.Framework.Vault.Forms.Results.SelectEntityResults object that will be returned by the dialog on close. The return value indicates if the dialog should close (true) or stay open (false).

Example

bool selectEntityValidate(Vault.Forms.Results.SelectEntityResults results)
{
    foreach(Vault.Currency.Entities.IEntity entity in results.SelectedEntities)
    {
        //do validation
        if(notValid)
            return false;
    }
    return true;
}

See Also