Hi,
I have a little problem with group by display.
I have :
column definition
The problem is.... what's displayed. I can see :
MyBrand1 - 100.00 €
Size1 - 50.00 €
DontCare1 - 25.00 €
DontCare2 - 25 €
Size2 - 50.00 €
DontCare1 - 20 €
DontCare2 - 30 €
MyBrand2 - 300.00 €
Size1 - 50.00 €
DontCare1 - 25 €
DontCare2 - 25 €
Size2 - 50.00 €
DontCare1 - 20 €
DontCare2 - 30.00 €
Sometime I can see the #.##, and I don't know why, sometime #.
I bind column like this :
I change colors of "Expanders" with this code (I don't do anything else with "them") in ViewCellFormatting event
Can you explain me why sum is rounded sometime ? because, I don't mind if my value is an int, My customer want to diplay the ".00".
Thank's
Fabien
I have a little problem with group by display.
I have :
pRadGridView.MasterGridViewTemplate.GroupByExpressions.Add("Something1 as Brand format \"{1} - \",sum(Price) as TotalPrice format \"{1} €\" Group By Something1"); |
pRadGridView.MasterGridViewTemplate.GroupByExpressions.Add("Something2 as Size format \"{1} - \",sum(Price) as TotalPrice format \"{1} €\" Group By Something2"); |
pRadGridView.MasterGridViewTemplate.GroupByExpressions.Add("Something3 as DontCare format \"{1} - \",sum(Price) as TotalPrice format \"{1} €\" Group By Something3"); |
column definition
GridViewDataColumn Price_Column = new GridViewDataColumn("Price", "Price"); |
Price_Column.HeaderText = "Prices"; |
Price_Column.FormatString = "{0:N2}"; |
Price_Column.IsVisible = false; |
Price_Column.DataType = typeof(decimal); |
pRadGridView.MasterGridViewTemplate.Columns.Add(Price_Column); |
The problem is.... what's displayed. I can see :
MyBrand1 - 100.00 €
Size1 - 50.00 €
DontCare1 - 25.00 €
DontCare2 - 25 €
Size2 - 50.00 €
DontCare1 - 20 €
DontCare2 - 30 €
MyBrand2 - 300.00 €
Size1 - 50.00 €
DontCare1 - 25 €
DontCare2 - 25 €
Size2 - 50.00 €
DontCare1 - 20 €
DontCare2 - 30.00 €
Sometime I can see the #.##, and I don't know why, sometime #.
I bind column like this :
// subTotal is a sum a other columns, and it's int value :) |
row.Cells["Price"].Value = subTotal * Math.Round(StreetPriceEuro, 2); |
I change colors of "Expanders" with this code (I don't do anything else with "them") in ViewCellFormatting event
// Custom expanders colors |
if (pGridCellElement.RowInfo is GridViewGroupRowInfo && pGridCellElement.RowElement is GridGroupHeaderRowElement) |
{ |
int level = ((GridViewGroupRowInfo)pGridCellElement.RowInfo).Group.Level; |
if (level == 3) pGridCellElement.ForeColor = Color.FromArgb(31, 71, 79); |
if (level == 4) pGridCellElement.ForeColor = Color.FromArgb(50, 115, 128); |
if (level == 5) pGridCellElement.ForeColor = Color.FromArgb(70, 161, 179); |
pGridCellElement.HorizontalLineColor = pGridCellElement.ForeColor; |
return; |
} |
Can you explain me why sum is rounded sometime ? because, I don't mind if my value is an int, My customer want to diplay the ".00".
Thank's
Fabien