How to change the alignment of text inside OLAP Grid's value cells in WPF?
You can change the alignment of the text inside WPF OLAPGrid value cells as shown in the following code example.
C#
public MainWindow() { InitializeComponent(); this.olapGrid1.OlapDataManager = new Syncfusion.Olap.Manager.OlapDataManager("Data Source=http://bi.syncfusion.com/olap/msmdpump.dll; Initial Catalog=Adventure Works DW 2008 SE;"); this.olapGrid1.OlapDataManager.SetCurrentReport(SampleReport()); this.olapGrid1.ValueCellTextAlignment = System.Windows.HorizontalAlignment.Left; }
VB
Public Sub New() InitializeComponent() Me.olapGrid1.OlapDataManager = New Syncfusion.Olap.Manager.OlapDataManager("Data Source=http://bi.syncfusion.com/olap/msmdpump.dll; Initial Catalog=Adventure Works DW 2008 SE;") Me.olapGrid1.OlapDataManager.SetCurrentReport(SampleReport()) Me.olapGrid1.ValueCellTextAlignment = System.Windows.HorizontalAlignment.Left End Sub
Conclusion
I hope you enjoyed learning about how to change the alignment of text inside OLAP Grid's value cells.
You can refer to our WPF OLAPGrid feature tour page to know about its other groundbreaking feature representations. You can also explore our WPF OLAPGrid to understand how to present and manipulate data.
For current customers, you can check out our WPF Controls from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our WPF OLAPGrid and other WPF controls.
If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!