When I drag them into my grid. Only the names of the classes just show up (SampleDataGeneratorNS.Seller) instead of all the columns/rows. Tried everything I can think of but I am pretty new at this Infragistics stuff. What am I doing wrong? (Code is attached)
Thanks!-Jesse
Hi,
Because XamPivotGrid analyzes flat data your data should be in table view. I mean that your data source should be like non normalized table and should contain simple types. In your Sale class you have Product property from type Product. The control cannot analyze this property as data and handles the property with its ToString() method. So to expose the mean full text you should create new property which returns the Product.Name property as shown below:
public class Sale { public Product Product { get; set; } public Seller Seller { get; set; } public DateTime Date { get; set; } public string City { get { return Seller.City; } set { Seller.City = value; } } public int NumberOfUnits { get; set; } public double AmountOfSale { get { return Product.Price * NumberOfUnits; } set { Product.Price = value / NumberOfUnits; } } public string ProductName { get { return this.Product.Name; } } public string SallerName { get { return this.Seller.Name; } } }
Regards