GridViewSettings.Styles Property
Provides access to the style settings that control the appearance of the extension’s visual elements.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v25.1.dll
NuGet Package: DevExpress.Web.Mvc5
Declaration
Property Value
Type | Description |
---|---|
GridViewStyles | A GridViewStyles object that provides style settings for view elements. |
Remarks
The following code sample centers column captions:
@Html.DevExpress().GridView(settings => {
settings.Name = "gvPaging";
settings.Columns.Add("ContactName");
settings.Columns.Add("CompanyName");
settings.Columns.Add("Country");
settings.KeyFieldName = "CustomerID";
settings.Styles.Header.HorizontalAlign = HorizontalAlign.Center;
settings.CallbackRouteValues = new { Controller = "PagingAndScrolling", Action = "PagingPartial" };
}).Bind(Model).GetHtml()
See Also