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 display placeholder characters when cell content exceeds cell width?

Platform: WinForms |
Control: GridControl

If the content of a grid cell exceeds the cell width, then characters can be displayed as placeholders instead of actual letters or numbers, indicating that the cell contains more content than can be shown within the cell. By default, the number sign (#) is used as the placeholder character, but you can specify custom characters. This article explains the usage of the placeholders.

Converting Alphabetic Content

In order to specify only alphabetic contents as placeholders, the AutoFit property can be set as Alphabet.

Code Snippet


gridControl1[2, 1].AutoFit = AutoFitOptions.Alphabet;



gridControl1(2, 1).AutoFit = AutoFitOptions.Alphabet


Converting Numeric Content

In order to specify the only numeric contents as placeholders, the AutoFit property can be set as Numeric value.

Code Snippet


gridControl1[4, 3].AutoFit = AutoFitOptions.Numeric;



gridControl1(4, 3).AutoFit = AutoFitOptions.Numeric


Converting Alphabetic and Numeric Content

In order to use both the contents of alpha-numeric contents as placeholders, the AutoFit property can be set to the value Both.

Code Snippet


gridControl1[6, 3].AutoFit = AutoFitOptions.Both; 



gridControl1(6, 3).AutoFit = AutoFitOptions.Both


Not Converting Content

In order to restrict display of placeholders with any of the contents, the AutoFit property can be set to the value None. By Default, the value of AutoFit property is None.

Code Snippet


gridControl1[8, 6].AutoFit = AutoFitOptions.None;



gridControl1(8, 6).AutoFit = AutoFitOptions.None


Setting Custom Characters

Characters other than the number sign (#), the default, can be used to replace alphanumeric content that exceeds the size of a cell. In order to do so, the AutoFitChar property can be used to set as a desired character.


gridControl1[4, 6].AutoFitChar = '$';



gridControl1(4, 6).AutoFitChar = "$"



Showing placeholder characters in GridControl

Sample links:

C# PlaceHolders_CS

VB PlaceHolders_VB


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