Skip to content

This example demonstrates how to add and display custom field values in Pivot Grid ​​along with data provided by a data source.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/winforms-pivot-grid-add-custom-field-values-rows-column-not-present-in-datasource

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pivot Grid for WinForms - How to Add Custom Field Values (Rows/Columns) that are not Present in a Data Source

Pivot Grid does not display field values in row and column areas if these values are not represented in the underlying data source. This example demonstrates how to create a data source wrapper that contains merged values ​​from a data source and a custom collection. In the example, the CustomDates collection is filled with DateTime values based on the actual Start/End DateTime range and the specified interval (for example, Month). This collection is passed to the DateDataSourceWrapper class instance along with the original data source collection (Table.DefaultView). The CustomDates collection is merged with the original data table and you do not need to modify the data source. When Pivot Grid requests data with the common IList and ITypedList interface methods, the DateDataSourceWrapper object returns data from the original collection or generates EmptyObjectPropertyDescriptor objects to return rows with null "Date" field values.

The following image illustrates a Pivot Grid that displays the custom March field value from the CustomDates collection along with field values from the data source:

Pivot Grid - Custom Field Values

Files to Review

Documentation

More Examples

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

This example demonstrates how to add and display custom field values in Pivot Grid ​​along with data provided by a data source.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 6