Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/07/10 14:36:22 (14 years ago)
Author:
mkommend
Message:
  • refactored ViewHost and various views to use fewer nested controls
  • added UnitTests for ContentViews to ensure proper using of the ContentAttribute
  • fixed some views which could not handle null as Content

(ticket #972)

File:
1 edited

Legend:

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

    r3936 r4011  
    135135    private void UpdateRowHeaders() {
    136136      int firstDisplayedRowIndex = dataGridView.FirstDisplayedScrollingRowIndex;
    137       if(firstDisplayedRowIndex == -1)
     137      if (firstDisplayedRowIndex == -1)
    138138        firstDisplayedRowIndex = 0;
    139139      int lastDisplaydRowIndex = firstDisplayedRowIndex + dataGridView.DisplayedRowCount(true);
     
    241241    }
    242242    private void dataGridView_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) {
    243       if (e.RowIndex < Content.Rows && e.ColumnIndex < Content.Columns) {
     243      if (Content != null && e.RowIndex < Content.Rows && e.ColumnIndex < Content.Columns) {
    244244        int rowIndex = virtualRowIndizes[e.RowIndex];
    245245        e.Value = Content.GetValue(rowIndex, e.ColumnIndex);
Note: See TracChangeset for help on using the changeset viewer.