Skip to main content

GridViewExtension.GetViewModel(String) Method

Returns the GridView’s view model object that maintains the grid state and provides the means to populate itself with data when the grid is used in custom data binding mode.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v23.2.dll

NuGet Package: DevExpress.Web.Mvc5


public static GridViewModel GetViewModel(
    string name


Name Type Description
name String

A string value that is the unique identifier name (SettingsBase.Name) for the GridView.


Type Description

A GridViewModel object representing the grid view model.


Refer to the Custom Data Binding - Overview topic to learn more.

The following code snippets (auto-collected from DevExpress Examples) contain references to the GetViewModel(String) method.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also