Back to Devexpress

QueryBuilderExtension.GetSaveCallbackResult(String) Method

aspnetmvc-devexpress-dot-web-dot-mvc-dot-querybuilderextension-dot-getsavecallbackresult-x28-system-dot-string-x29.md

latest3.5 KB
Original Source

QueryBuilderExtension.GetSaveCallbackResult(String) Method

Returns the result of a callback sent to the server for saving a query.

Namespace : DevExpress.Web.Mvc

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

NuGet Package : DevExpress.Web.Mvc5

Declaration

csharp
public static QueryBuilderSaveCallbackResult GetSaveCallbackResult(
    string name
)
vb
Public Shared Function GetSaveCallbackResult(
    name As String
) As QueryBuilderSaveCallbackResult

Parameters

NameTypeDescription
nameString

A string that specified the Query Builder name.

|

Returns

TypeDescription
QueryBuilderSaveCallbackResult

A QueryBuilderSaveCallbackResult object.

|

Remarks

Use the GetSaveCallbackResult method in a controller action specified by the QueryBuilderSettings.SaveCallbackRouteValues property to obtain the callback result.

See the Saving Queries topic for more information on using this method.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetSaveCallbackResult(String) method.

Note

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.

asp-net-mvc-query-builder-provide-data-to-the-gridview-extension/CS/MvcQueryBuilder/Controllers/QueryBuilderController.cs#L12

csharp
public ActionResult Save() {
    var result = QueryBuilderExtension.GetSaveCallbackResult("QueryBuilder");
    Session["SelectCommand"] = result.SelectStatement;

asp-net-mvc-query-builder-provide-data-to-the-gridview-extension/VB/MvcQueryBuilder/Controllers/QueryBuilderController.vb#L15

vb
Public Function Save() As ActionResult
    Dim result = QueryBuilderExtension.GetSaveCallbackResult("QueryBuilder")
    Session("SelectCommand") = result.SelectStatement

See Also

Saving Queries

QueryBuilderExtension Class

QueryBuilderExtension Members

DevExpress.Web.Mvc Namespace