We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

advices for a report

to simplfy i have this database model

as you can see , nothing exotic . just a standard Product/Order/Orderdetails relationship

each product can be sold with different prices over time (OD_PRICE column)

now what i want to show is something like this :

so for each product i want to display differents prices that it was sold with , and the sum of the quantities and total

wich component i can use ?.
is pivotgrid could be used for this scenario, or a regular grid would suffice

please give me some ideas and directions , since ia have never used a pivot before

my plateform options are Winform or WPF
thanks and good day

8 Replies

IS issam February 3, 2015 03:55 AM UTC

Sound great !

Thanks for your help .

IS issam February 3, 2015 03:55 AM UTC

after analysing the pivotgrid demos
i think that it should work for me too .
but i have noticed something strange
<a rel='nofollow' href="http://www.hostingpics.net/viewer.php?id=50396059h2.jpg"><img src="http://img4.hostingpics.net/thumbs/mini_50396059h2.jpg" alt="Heberger image" /></a>
it's from the rowpivotonly demo

if i understand correctly the amount column is calculated by (unitPrice * Qte)

but if you take the first row for example , it give different result !

IS issam February 3, 2015 03:55 AM UTC

Finally i ended up by using a datagrid with a masterdetail option ,

and it fill muy needs better after little thinking ;)

just one last thing :

here the class that is binded to the master datagrid

 public class ProductInfo

        public int? ID_Product { get; set; }

        public string ProductName { get; set; }

        public double? ProductPrice { get; set; }

        public int? TotalQty { get; set; }

        public double? Amount{ get; set; }

        public List<OrderDetails> PriceDetails {get; set;}

what i want is to show the detail datagrid only if the pricedetails.count subcollection > 1 .

so i want to make a condition to show the detailsgrid

thanks again .

IS issam February 3, 2015 03:55 AM UTC

this is great !

but for the moment , can you tell me please if i can make a condition for showing a detail grid in a master/detail sfdatagrid

i want to show the detailgrid and the + button , only if the subcollection count is greater than 1

i really appreciate your help on this

IS issam February 3, 2015 03:55 AM UTC

btw : i have switched to WPF :)

MK Muthukumar Kalyanasundaram Syncfusion Team February 3, 2015 03:55 AM UTC

Hi Issam,


Thank you for your interest in Syncfusion products.


We have analyzed your reported scenario at our end. You can use GridGroupingControl to achieved this scenario. You can bind the datasource interior to GridGroupingControl and you can set the  prices of each products  with different prices and calculate the quantities and total amounts. Please refer the below link,


Link: http://help.syncfusion.com/ug/windows%20forms/default.htm#!documents/creatinggridgrouping.htm


Pivot Grid – We have maintained the separate link of  controls. You can select the PivotGrid control from the list of control in the link.  Please make use of below documentation link,

Link: http://help.syncfusion.com/windows%20forms


Please let us know if you have any concern.



Muthukumar K

MK Muthukumar Kalyanasundaram Syncfusion Team February 3, 2015 03:55 AM UTC

Hi Issam,


Thanks for your update.


On you mentioned dashboard sample, we have passed some random value to calculate the amount ((price * qty )-discount). Here we have modified the sample as per your need. Please refer the below code:



ProductSales sales = new ProductSales();

sales.Country = countries[r.Next(1, countries.GetLength(0))];

/// 1 percent discount for 1 quantity

sales.Quantity = 2;

sales.Amount = 30000 * sales.Quantity;

sales.Date = dates[r.Next(r.Next(dates.GetLength(0) + 1))];

sales.Product = products[r.Next(r.Next(products.GetLength(0) + 1))];

sales.TotalPrice = sales.Amount * sales.Quantity;


Please let us know if you have any concern.



Muthukumar K

Attachment: RowPivotsOnly_Demo_5877de1a.zip

SR Sivakumar R Syncfusion Team February 4, 2015 04:56 PM UTC

Hi Issam,

By default Expander Icon won't get displayed in SfDataGrid, if subcollection count is zero. You can enable or disable this behavior by setting SfDataGird.HideEmptyGridViewDefinition property.

Documentation link:


Live Chat Icon For mobile
Up arrow icon