PivotGrid Control and pivotChart visual customization options?

Good day,

I have a large datatable in a SQLite database that I am binding to a pivotGridControl. It generally handles the data extremely well. However, I love the customization options present in the regular gridcontrol. I allow my users to load all of a controls properties in a propertiesGrid so that they can dynamically set the column header colors, gradients, font settings, and any other property available in order to create templates that they can then save to XML via serialization. Likewise, I allow the same thing to be done with the standard chartControl. My question is this, is it possible to have menus that allow the editing of all visual properties for each of the pivot controls to allow for creative editing at run-time, as well as "turning off" the pivot functions to make it appear as though it is essentially a standard gridControl once the data has been set?

Thanks.

3 Replies

AR Arulpriya Ramalingam Syncfusion Team November 16, 2017 12:48 PM UTC

Hi Travis,  
  
Thanks for using Syncfusion products.  
  
From your update we suspect that, you are trying to edit the GridStyle of PivotGrid with PropertyGrid and set the DataSource at runtime. Please refer to the attached sample,  
  
Query  
Response  
is it possible to have menus that allow the editing of all visual properties for each of the pivot controls to allow for creative editing at run-time  
The PivotGridControl properties can be modified at run time by usingPropertyGrid. The properties of PivotGrid can be set to PropertyGrid by using the SelectedObject property of PropertyGrid. Please refer to the below code and sample,  
  
Code example  
  
//To set the PropertyWindow  
this.propertyGrid1.SelectedObject = this.pivotGridControl1;  
  
as well as "turning off" the pivot functions to make it appear as though it is essentially a standard gridControl once the data has been set?  
You can disable the PropertyGrid where you want by using the Enabledproperty,  
 
Code example  
//To Disable the PropertyGrid  
propertyGrid1.Enabled = false;  
I allow my users to load all of a controls properties in a propertiesGrid so that they can dynamically set the column header colors, gradients, font settings, and any other property available in order to create templates that they can then save to XML via serialization.  
We regret to let you know that the PivotGrid does not have the support to serialize/deserialize the data/style in to an Xml file. Already we have logged a feature report to provide support for Serialize/Deserialize in PivotGrid. This feature will be included in any of our upcoming release.   
  
  
Please let us know if we misunderstood anything from your requirements.  
  
Regards,  
Arulpriya  



TC Travis Chambers November 16, 2017 01:21 PM UTC

Thank you for your feedback. I don't think I made my questions clear. I don't need to know how to manage the properties grid, I need a way to customize the visual style of the pivot grid at run time (i.e. column backcolor, font style, borders, etc.). This works great with the propertygrid for standard gridControls, but the pivotGridControl does not appear to have these properties by default. There is a backcolor property for the control itself, but this doesn't even work when editing it from the propertiesGrid. There seem to be very few properties concerning visual styles, outside of the Skins property. Is there a way get access to the visual properties at run-time, such as through a context menu?

thanks.



AR Arulpriya Ramalingam Syncfusion Team November 17, 2017 11:36 AM UTC

Hi Travis,   
   
Thanks for your update.   
   
We could understand your scenario. As per the pivotGrid architecture, the style properties are added to the table model of the PivotGrid to the customize the style for each cell. You can avail the base style properties (i.e. BackColor, Font, FontColor,Borders, etc., properties ) in the TableStyle ofGridModel and the GridStyles (i.e. GroupDropArea, GridVisualStyle, etc.,) are directly added to the grid. Moreover, the PropertyGrid applies the Property values to the grid directly. So, the properties in the TableStyle could not be modified through PropertyWindow. We request you to use the below code to change the TableStyle of the grid at run time through a button. Please refer to the attached sample,   
   
Code example   
   
//To set the back color for table   
this.pivotGridControl1.TableModel.TableStyle.BackColor = Color.Aquamarine;   
//To set the background image for table   
//this.pivotGridControl1.TableControl.BackgroundImage = SystemIcons.Error.ToBitmap();   
//To set the font for table   
this.pivotGridControl1.TableModel.TableStyle.Font = new GridFontInfo(newFont("Monotype Corsiva", 10f));   
//To draw the Border   
this.pivotGridControl1.TableModel.TableStyle.Borders.Bottom = newGridBorder(GridBorderStyle.Solid);   
//To draw the Border   
this.pivotGridControl1.TableModel.TableStyle.Borders.Right = newGridBorder(GridBorderStyle.Solid);   
   
   
Screenshot   
   
    
   
  
Regards,   
Arulpriya   


Loader.
Up arrow icon