Skip to main content

GridViewColumnState.ForceType(Type) Method

Inform the GridView extension about the types of its columns.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v24.1.dll

NuGet Package: DevExpress.Web.Mvc5

Declaration

public void ForceType(
    Type columnType
)

Parameters

Name Type Description
columnType Type

The grid’s column type.

Remarks

If the grid’s data source is not empty on the first load, the grid automatically determines and saves the type of objects contained within its data source, so you do not have to force the type of objects contained within its data source.

If the grid’s data source is empty (e.g., because of an invalid filter expression or empty data base) on the first load, use the ForceType method to inform the GridView extension about the types of its columns.

See Also