When I add summary rows to my radgridview. something strange is happening. I demonstrate it to you in two pictures. please take a look at attachments
Hi, Is there anyway to override ViewCellFormatting in my own radGridView that derived from RadGridView?
Thanks for your suggestion. It fixes my problem temporarily. But it must be considered in next updates.
The possible solution that I can suggest is to use the ViewCellFormatting event and clear the applied BackgroundShape to the summary cell: private void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e) { GridSummaryCellElement summaryCell = e.CellElement as GridSummaryCellElement; if (summaryCell != null) { summaryCell.BackgroundShape = null; } }
Here is a sample code snippet how to replicate the problem: public RadForm1() { InitializeComponent(); ThemeResolutionService.ApplicationThemeName = "Windows8"; } private void RadForm1_Load(object sender, EventArgs e) { this.ordersTableAdapter.Fill(this.nwindDataSet.Orders); this.radGridView1.DataSource = this.ordersBindingSource; this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill; GridViewSummaryItem summaryItem = new GridViewSummaryItem(); summaryItem.Name = "ShipName"; summaryItem.Aggregate = GridAggregateFunction.Count; GridViewSummaryItem summaryItem2 = new GridViewSummaryItem(); summaryItem2.Name = "OrderID"; summaryItem2.Aggregate = GridAggregateFunction.Sum; GridViewSummaryItem summaryItem3 = new GridViewSummaryItem(); summaryItem3.Name = "ShipCountry"; summaryItem3.Aggregate = GridAggregateFunction.Count; GridViewSummaryRowItem summaryRowItem = new GridViewSummaryRowItem(); summaryRowItem.Add(summaryItem); summaryRowItem.Add(summaryItem2); summaryRowItem.Add(summaryItem3); this.radGridView1.SummaryRowsBottom.Add(summaryRowItem); this.radGridView1.RightToLeft = System.Windows.Forms.RightToLeft.Yes; }
also take a look at minus sign !!!!!