I have placed a pivot grid and data selector on one user control. I am using flatdatasource for pivot. To add measures, I have written the code something like this...
cubeMetadataValues.DimensionSettings.Add(new DimensionMetadata() { SourcePropertyName = "CostPrice", DisplayName = "Cost Price", DimensionType = DimensionType.Measure, GroupName = "Price" }); cubeMetadataValues.DimensionSettings.Add(new DimensionMetadata() { SourcePropertyName = "OriginalPrice", DisplayName = "Original Price", DimensionType = DimensionType.Measure, GroupName = "Price" });
I can see the groups created in Measures section of pivot data selector as seen in attachment.
How to create such groups for all the dimensions? I've more than 30 dimensions to show in data selector control and would like to organize them in logical groups. Has anyone did something like this? Any code sample would be appriciated.
Thanks,
Regards,
Rohan Bhat
Hello Rohan,
Thank you for your post. I have been looking into it and I can say that the approach you use seems to be the best one for achieving the functionality you want, so I can suggest you use it for all your dimensions. Also if I think of a better solution I will let you know.
Hope this helps you.
Hi Stefan,
Thanks for your reply.
cubeMetadataValues.DimensionSettings.Add(new DimensionMetadata() { SourcePropertyName = "RetailProductID", DisplayName = "Product", DimensionType = DimensionType.Dimension, GroupName = "Product" });
Please see above lines of code. I am adding dimensions and measures in a way shown above. As you've suggested, I've specified "GroupName" for all the measures and dimensions while adding them to "cubeMetadataValues.DimensionSettings". I can see groups created for measures only, and all dimensions are listed one below another. There are no groups shown. You can see the attached image - There are 4 groups - Forecast, Price, Sales and Stock under Measures. And all other dimensions are listed without any groups one after the other. Could you please let me know how to group them in the same way as measures?
I am using MetadataTreeItemAdding event to skip some of the measures/dimensions to be added to the data selector control. Do you think that affects groups creation for dimensions?
Rohan
Thanks for your time and reply...
I am hoping that the feature of "Grouping dimensions" will be added to the product soon. It would help us arrange all the dimensions in logical groups when large number of dimensions are present in data selector.
After some research Dimensions Grouping has been determine as a new Product Idea. I have sent your Product Idea directly to our product management team. Our product team chooses new Product Ideas for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested ideas, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your idea is chosen for development, you will be notified at that time. Your reference number for this Product Idea is PI13050062
If you would like to follow up on your Product Idea at a later point, you may contact Developer Support management via email. Please include the reference number of your Product Idea in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com