Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4030


Ignore:
Timestamp:
07/13/10 17:09:39 (14 years ago)
Author:
mkommend
Message:

added null checks for content in CellValidatingEvent of StringConvertibleArray and -MatrixView (ticket #968)

Location:
trunk/sources/HeuristicLab.Data.Views/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleArrayView.cs

    r3904 r4030  
    140140    private void dataGridView_CellValidating(object sender, DataGridViewCellValidatingEventArgs e) {
    141141      string errorMessage;
    142       if (!Content.Validate(e.FormattedValue.ToString(), out errorMessage)) {
     142      if (Content != null && !Content.Validate(e.FormattedValue.ToString(), out errorMessage)) {
    143143        e.Cancel = true;
    144144        dataGridView.Rows[e.RowIndex].ErrorText = errorMessage;
  • trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs

    r4011 r4030  
    223223      if (!dataGridView.ReadOnly) {
    224224        string errorMessage;
    225         if (!Content.Validate(e.FormattedValue.ToString(), out errorMessage)) {
     225        if (Content != null && !Content.Validate(e.FormattedValue.ToString(), out errorMessage)) {
    226226          e.Cancel = true;
    227227          dataGridView.Rows[e.RowIndex].ErrorText = errorMessage;
Note: See TracChangeset for help on using the changeset viewer.