How to display placeholder characters when cell content exceeds cell width?
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.
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.
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.
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.
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 = "$"