Hello,
Can you provide more information on the scenario you need to cover? This will help us evaluate the specific need and provide further assistance.
In general, not showing some fields using the API from the component is a valid feature request. The reason the fields are visible by default is that the PivotGrid works by reading the information about the fields from the data source and displaying them, so that the end user is aware of all remaining fields that are not selected as rows/columns - this is the same for the XMLA/OLAP data binding and thus it is also present in the local data binding.
The common case for not showing fields is not to include them in the model and the typical approach is to create view models that contain only the information that should be displayed in the PivotGrid view, e.g. show product data inventory in years, months, etc., but if there isn't a need to display a product price, then such a field will not be included in the view model.
In terms of memory usage, this is up to the developer to decide whether transforming the data is worth it, thus the configuration can be adjusted to the specific needs.
For example, the contrary thesis is that having a single data source might result in another component changing the data (e.g. suppose somebody edits a Grid which is data bound to the same list of data as a PivotGrid), then synchronizing the data might require additional effort or might not be intended, e.g. suppose that an end user is expanding sections in the PivotGrid and suddenly some data rows are updated or deleted, which might result in a totally different data hierarchy.
On the other hand, if some fields from the model need to be specified as visible, then this will probably require designating which fields exactly should be displayed and whether this is done in a class file for a view model (where the fields are explicitly listed) or in the component (e.g. with tags) seems similar in terms of final code.
I look forward to your thoughts on the above and getting more details on the scenario and how the memory footprint is organized in your case, so I can provide further suggestions.
Regards,
Stamo Gochev
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.