Articles in this section
Category / Section

How to achieve Excel-like text alignment in WInForms GridControl?

2 mins read

By default, text alignment in WinForms GridControl is right-aligned for both alphabetic and numeric values. To achieve Excel-like alignment, use the ExcelLikeAlignment property. With this setting, string values are aligned to the left and numeric values are aligned to the right within each cell, matching Excel’s default behavior.


C#

this.gridControl1.ExcelLikeAlignment = true;

VB

Me.GridControl1.ExcelLikeAlignment = True

Showing text alignment in GridControl


View sample in GitHub

 

Conclusion

I hope you enjoyed learning about how to achieve Excel-like text alignment in GridControl.

You can refer to our WinForms GridControl feature tour page to learn about its other groundbreaking feature representations. You can also explore our documentation to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied