/// <summary> /// The DataGridTextColumn.Footer.RowStepCalculation event handler /// For footer cell for "Discount" field. accounts only those records in which the value of the field "Discount" > 0 /// </summary> private void dataGridTextColumn5_Footer_RowStepCalculation(object sender, EhLib.WinForms.DataGridFooterCalculationEventArgs e) { object val = e.Column.GetRowValue(e.Row); if (val == null || (Single)val == 0) { e.Handled = true; } }
/// <summary> /// DataGridEh.Footer.RowStepCalculation event handler /// Take into account only the selected records in the records selection mode. /// </summary> private void dataGridEh1_Footer_RowStepCalculation(object sender, EhLib.WinForms.DataGridFooterCalculationEventArgs e) { if (selectionTypeRows) { if (!e.Row.Selected) { e.Handled = true; } } }