Ejemplo n.º 1
0
        private void bandedGridView1_CustomDrawGroupRow(object sender, DevExpress.XtraGrid.Views.Base.RowObjectCustomDrawEventArgs e)
        {
            BandedGridView   view = sender as BandedGridView;
            GridGroupRowInfo info = e.Info as GridGroupRowInfo;

            if (info.Column == colANA_GRUP)
            {
                var text = view.GetGroupSummaryText(e.RowHandle);
                text            = Convert.ToDecimal(text.Substring(0, text.IndexOf(",")).Replace(" ", "")).ToString("N2");
                info.GroupText  = "<color=Maroon>" + info.GroupValueText + "</color> " + " : ";
                info.GroupText += "<color=blue>" + text + "</color> ";
            }
            if (info.Column == colGRUP)
            {
                var text       = view.GetGroupSummaryText(e.RowHandle);
                var firstIndex = text.IndexOf(",");
                var lastIndex  = text.LastIndexOf(",");
                text            = text.Substring(0, text.LastIndexOf(","));
                text            = Convert.ToDecimal(text.Substring(text.IndexOf(",") + 1).Replace(" ", "")).ToString("N2");
                info.GroupText  = "<color=Maroon>" + info.GroupValueText + "</color> " + " : ";
                info.GroupText += "<color=green>" + text + "</color> ";
            }
            if (info.Column == colCARI_KODLAR)
            {
                var text = view.GetGroupSummaryText(e.RowHandle);
                var lst  = text.LastIndexOf(",");
                text            = Convert.ToDecimal(text.Substring(text.LastIndexOf(",") + 1).Replace(" ", "")).ToString("N2");
                info.GroupText  = "<color=Maroon>" + info.GroupValueText + "</color> " + " : ";
                info.GroupText += "<color=black>" + text + "</color> ";
            }
        }