Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ClientControlContentBuilderBase<TSettings, TImpl>.AutoBind(Boolean) Method

Namespace: DevExpress.AspNetCore.Reporting

Assembly: DevExpress.AspNetCore.Reporting.v24.2.dll

NuGet Package: DevExpress.AspNetCore.Reporting

#Declaration

public TImpl AutoBind(
    bool autoBind
)

#Parameters

Name Type Description
autoBind Boolean

True to bind a reporting component to an autogenerated View Model automatically; otherwise, false.

#Returns

Type Description
TImpl

A builder instance that can be used to further configure the reporting component.

#Remarks

The default setting for AutoBind is true. In this mode, the View Model is created based on the values you specify in a View for the reporting component. This View Model is then used when Knockout library enables component binding.

If AutoBind is set to false, an element with a reporting component binding is not inserted automatically. You can create a custom view model for such an element and enable Knockout binding as needed. To create an element with a reporting component binding, call the Build method of the component builder.

The following code manually activates the Knockout binding of the Report Designer, but the binding is set to the autogenerated View Model.

@{
    var viewerRender = Html.DevExpress().ReportDesigner("ReportDesigner1").Height("1000px").AutoBind(false);
}

@viewerRender.Build("reportDesignerOptions")

<script type="text/javascript">
    ko.applyBindings({ reportDesignerOptions: @viewerRender });
</script>
See Also