Beispiel #1
0
        private void DataGridView_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
        {
            DataGridView dgv = sender as DataGridView;

            Trace t = dgv.Columns[e.ColumnIndex].Tag as Trace;

            if (t != null)
            {
                e.Value = t.ToHumanReadable(t.GetYValue(DataSource.Cursors[e.RowIndex].X));
            }

            if (dgv.Columns[e.ColumnIndex].DataPropertyName == nameof(Scope.Cursor.X))
            {
                e.Value = dataSource.HorizontalToHumanReadable((double)e.Value);
            }
        }