Category / Section
How to apply multiple gravity flags to align text of a column ?
1 min read
SfDataGrid allows you to apply multiple gravity flags to align the text of a column by using GridColumn.TextAlignment property.
The below code illustrates how to apply the multiple gravity flags to align a text of a column.
GridTextColumn orderId = new GridTextColumn(); orderId.MappingName = "OrderID"; orderId.TextAlignment = Android.Views.GravityFlags.Start | Android.Views.GravityFlags.CenterVertical;
Refer the following screenshot that shows the outcome upon execution of the above code.
Sample Link:
How to apply multiple gravity flags to align text of a column?