Search
ValidationForm Class
Remarks See Also
 






A form which can be used to define validation rules for cells within a worksheet

Namespace: MindFusion.Spreadsheet.WinForms
Assembly: MindFusion.Spreadsheet.WinForms.StandardForms

 Syntax

C#  Copy Code

public class ValidationForm : Form

Visual Basic  Copy Code

Public Class ValidationForm
    Inherits Form

 Remarks

This form can be used to add, edit, and remove data validation for a cell or a range of cells. To use the form, create an instance of the ValidationForm class, by providing the related workbook and the initial IValidation object, and call the ShowDialog method. To apply the changes made through the form, call the Apply method. The following image shows the form:

 Example

The code below demonstrates how to display the validation form for an existing CellRange instance.

C#  Copy Code

var form = new ValidationForm(workbook, cellRange.Validation);
if (form.ShowDialog(this) == DialogResult.OK)
{
    using (workbook.StartChangeOperation(worksheet))
        form.Apply(cellRange.Validation);
}

Visual Basic  Copy Code

Dim form = New ValidationForm(workbook, cellRange.Validation)
If form.ShowDialog(Me) = DialogResult.OK Then

        Using workbook.StartChangeOperation(worksheet)
        form.Apply(cellRange.Validation)
    End Using

End If

 Inheritance Hierarchy

System.Object
    System.MarshalByRefObject
        System.ComponentModel.Component
            System.Windows.Forms.Control
                System.Windows.Forms.ScrollableControl
                    System.Windows.Forms.ContainerControl
                        System.Windows.Forms.Form
                            MindFusion.Spreadsheet.WinForms.ValidationForm

 See Also