Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
365
Seller and Product Group aren't exploding out...
posted

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

SL_xamPivotGrid.zip
Parents
No Data
Reply
  • 7922
    posted

    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 { getset; }
            public Seller Seller { getset; }
            public DateTime Date { getset; }
     
            public string City
            {
                get { return Seller.City; }
                set { Seller.City = value; }
            }
     
            public int NumberOfUnits { getset; }
     
            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

Children