We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to avoid text cut off while BorderMargins are using in WinForms GridControl or GridGroupingControl?

Platform: WinForms |
Control: GridGroupingControl
Tags: styling

Avoid the text cutoff while border margin using in grid


When the border margin size is more than the text size, the text is cut off on display.

The following image shows the text cut off.

Show the cut off text

Figure 1: Text cut off


To avoid this problem of the text being cut off, use the Font.Unit property in the QueryCellStyleInfo event, and set the value to GraphicsUnit.World.


grid.QueryCellStyleInfo+=new GridTableCellStyleInfoEventHandler(grid_QueryCellStyleInfo);
e.Style.Font.Unit = GraphicsUnit.World;


AddHandler grid.QueryCellStyleInfo, AddressOf grid_QueryCellStyleInfo
e.Style.Font.Unit = GraphicsUnit.World

After applying the properties, the Grid is displayed as follows.

Show grid with applied properties

Figure 2: Grid with applied properties

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile