QueryBuilderExtension.Bind(String) Method
Binds the Query Builder to a data source using the specified connection name.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v24.1.dll
NuGet Package: DevExpress.Web.Mvc5
Declaration
Parameters
Name | Type | Description |
---|---|---|
connectionName | String | A string that specifies the connection string name defined in the application’s configuration file. |
Returns
Type | Description |
---|---|
QueryBuilderExtension | A QueryBuilderExtension object that specifies the Query Builder. |
Remarks
The following code snippet demonstrates how to bind the Query Builder to a database using the connection string name.
@Html.DevExpress().QueryBuilder(settings => {
settings.Name = "QueryBuilder";
settings.RouteValues = new { Controller = "QueryBuilder", Action = "Invoke" };
}).Bind("NorthwindConnection").GetHtml()
See Lesson 1 - Add the Query Builder to a Project for more information.
See Also