Learning note for Binding and validation

时间:2022-08-09 23:45:20

Summary of my learning note for WPF

Binding

  • Binding to DataSet.

    when we want to add new record, we should modify DataTable, not the DataTableView.

  • Validation when Binding

    we can get the detail descrition from msdn.

    For ValidationRules, generally, we have three validaterule type: ExceptionValidationRule, DataErrorValidationRule,CustomervalidationRule

    ExceptionValidationRule: you can refer msdn

    DataErrorValidationRule: you can refer DataErrorValidationRule

    CustomerErrorValidation: you canrefer CustomerRule

  • Binding Group

    if we hope to apply validationg over a set of propeties, we can use binding group and add validationrule to it.
    refer link in MSDN