private void ultraGridPolicyMetrics_InitializeGroupByRow(object sender, Infragistics.Win.UltraWinGrid.InitializeGroupByRowEventArgs e)
        {
            UltraGrid grid = (UltraGrid)sender;

            e.Row.Appearance.FontData.Bold = Infragistics.Win.DefaultableBoolean.True;
            if (e.Row.Column.Key == colMetricType || e.Row.Column.Key == colSeverity || e.Row.Column.Key == colIsEnabled || e.Row.Column.Key == colReportKey)
            {
                //e.Row.ExpansionIndicator = ShowExpansionIndicator.Never;
                int    count = GetRowMetricCount(e.Row);
                string descr = e.Row.ValueAsDisplayText;
                if (e.Row.Column.Key == colIsEnabled)
                {
                    descr = (bool)e.Row.Value ? "Enabled" : "Disabled";
                }
                e.Row.Description = descr
                                    + " (" + count + " check" +
                                    (count == 1 ? string.Empty : "s") + ")";
            }
            else
            {
                e.Row.Description = e.Row.ValueAsDisplayText;
            }
        }
Beispiel #2
0
        private void ultraGridPolicyMetrics_InitializeGroupByRow(object sender, Infragistics.Win.UltraWinGrid.InitializeGroupByRowEventArgs e)
        {
            UltraGrid grid = (UltraGrid)sender;

            e.Row.Appearance.FontData.Bold = Infragistics.Win.DefaultableBoolean.True;
            if (e.Row.Column.Key == Utility.Constants.POLICY_METRIC_COLUMN_METRIC_TYPE || e.Row.Column.Key == Utility.Constants.POLICY_METRIC_COLUMN_SEVERITY ||
                e.Row.Column.Key == Utility.Constants.POLICY_METRIC_COLUMN_IS_ENABLED || e.Row.Column.Key == Utility.Constants.POLICY_METRIC_COLUMN_REPORT_KEY)
            {
                //e.Row.ExpansionIndicator = ShowExpansionIndicator.Never;
                int    count = GetRowMetricCount(e.Row);
                string descr = e.Row.ValueAsDisplayText;
                if (e.Row.Column.Key == Utility.Constants.POLICY_METRIC_COLUMN_IS_ENABLED)
                {
                    descr = (bool)e.Row.Value ? "Enabled" : "Disabled";
                }
                e.Row.Description = descr
                                    + " (" + count + " check" +
                                    (count == 1 ? string.Empty : "s") + ")";
            }
            else
            {
                e.Row.Description = e.Row.ValueAsDisplayText;
            }
        }