TextAlign Property (GridStyleInfo)
Gets or sets Align text left of button elements (which is typical for combo boxes). Or align text right of button elements. See HorizontalAlignment how to align text left, centered, and right inside a cell rectangle.
Syntax
'Declaration <SRCategoryAttribute("StyleCategoryAppearance")> <BrowsableAttribute(True)> <NotifyParentPropertyAttribute(True)> <DescriptionAttribute("Align text left of button elements (which is typical for combo boxes). Or align text right of button elements.")> Public Property TextAlign As GridTextAlign
'Usage Dim instance As GridStyleInfo Dim value As GridTextAlign instance.TextAlign = value value = instance.TextAlign
[SRCategory("StyleCategoryAppearance")] [Browsable(true)] [NotifyParentProperty(true)] [Description("Align text left of button elements (which is typical for combo boxes). Or align text right of button elements.")] public GridTextAlign TextAlign {get; set;}
Remarks
Don't confuse this with HorizontalAlignment. TextAlign specifies if text should be displayed left or right of any cell button elements.
The default value for the TextAlign property is GridTextAlign.Default.
The property affects the behavior or appearance of the following cell types:
ComboBox (GridComboBoxCellRenderer) DropDown (GridDropDownCellRenderer) DropDownColorUI (GridDropDownColorUICellRenderer) DropDownGrid (GridDropDownGridCellRenderer) DropDownGridListControl (GridDropDownGridListControlCellRenderer) DropDownMonthCalendar (GridDropDownMonthCalendarCellRenderer) NumericUpDown (GridNumericUpDownCellRenderer)
Example
This example shows how to specify the alignment of the text.
this.gridControl1.TableStyle.TextAlign = GridTextAlign.Right;
Me.gridControl1.TableStyle.TextAlign = GridTextAlign.Right;
AssemblyVersion
Syncfusion.Grid.Windows: 17.3460.0.26
See Also