There is the possibility to upload data from a IEnumerable <IDictionary <string,object>> in FlatDataSource?
Or you can hide the properties of a class from being shown in PivotGrid?
Hello Alex,
You can use IEnumerable<IDictionary<string,object>> but I guess that will put you in a much complicated scenario than exposing your data using a simple business object type. If that is the way you prefer to go with I can try to prepare a small sample for you.
You can hide a property of class as two different approaches can be used:
1. Applying [DisplayAttribute(AutoGenerateField = false)] to your property.2. Setting DimensionMetadata.AutoGenerateField to false for specific property. You can look at this sample about how you can set such metadata for a property.
Regards.Plamen.
Thank you for your valuable response, Sime would like to send me an example of how you might solve the load of data from a IEnumerable <IDictionary <string,object>>
Hi Alex,
Excuse me for the late reply, I have been struggling to come up with a custom implementation that would allow you to use this sort of data source, but to no avail. It appears it is a limitation of the current version of the control since there is no way for FlatDataSource to examine an object of type Dictionary<,> in the way it can use it. If you want I can have our Developer support team submit a Product Idea on your behalf so this may appear in a future volume release version of ours.
Hi,
I have been testing the XamPivotGrid and would certainly find something like this to be a very useful feature. Essentially a way to be able to use non OLAP based DataSource where the fields can be dynamic rather than confined to properties of a type Eg as the key of a dictionary.
alexjimenez did you have any luck with the Roslyn approach?
Thanks
It would be great to take this into account, since I am working with DynamicObjects to be closer to the DataTable in ASP.net and not be married to a typed class.
Now I find doing tests to create a class Roslyn typed from a IEnumerable <IDictionary <string,object>> and so we can assign your PivotGrid. If I hereby resolve as I'll let you know if this can help at your fingertips.