Articles in this section
Category / Section

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

1 min read

By default, text alignment in grid control is right aligned for both alphabets and numeric. In order to achieve excel like alignment, make use of WinForms Grid ExcelLikeAlignment property. So, the string values will be aligned left side and numeric values will be aligned right side of the cell.

Code Snippet

C#

this.gridControl1.ExcelLikeAlignment = true;

 

VB

Me.gridControl1.ExcelLikeAlignment = True

 

Screenshot

Showing text alignment in GridControl

 

Sample Link:

C# Excel_like_TextAlignment_CS

VB Excel_like_TextAlignment_VB

 

 

Conclusion

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

You can refer to our WinForms GridControl feature tour page to learn about its other groundbreaking feature representations. You can also explore ourdocumentation 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 sign in to leave a comment
Access denied
Access denied