Skip to main content
All docs
V24.2

DxResource.Position Property

Specifies the resource position in the Resource Manager’s script collection.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.Resources.v24.2.dll

NuGet Package: DevExpress.Blazor.Resources

Declaration

public int Position { get; set; }

Property Value

Type Description
Int32

The position in the collection.

Remarks

The Resource Manager automatically registers client DevExpress resources based on installed NuGet packages.

The following table lists public DevExpress resources, their positions among other scripts, and NuGet packages that include these scripts:

Position

DevExpress Resource

NuGet Packages

0

CommonResources.KnockoutJS

DevExpress.Blazor.Dashboard
DevExpress.Blazor.Reporting.JSBasedControls

150

BlazorResources.QuillJS

DevExpress.Blazor

200

CommonResources.DevExtremeJS

DevExpress.Blazor
DevExpress.Blazor.Dashboard
DevExpress.Blazor.Reporting.JSBasedControls
DevExpress.Blazor.RichEdit

300

CommonResources.JQueryJS

DevExpress.Blazor.Dashboard
DevExpress.Blazor.Reporting.JSBasedControls

400

CommonResources.AceJS

DevExpress.Blazor.Dashboard
DevExpress.Blazor.Reporting.JSBasedControls

500

CommonResources.AceLanguageToolsJS

DevExpress.Blazor.Dashboard
DevExpress.Blazor.Reporting.JSBasedControls

600

CommonResources.AnalyticsJS

DevExpress.Blazor.Dashboard
DevExpress.Blazor.Reporting.JSBasedControls

700

JSBasedReportingResources.WebDocumentViewerJS

DevExpress.Blazor.Reporting.JSBasedControls

700

CommonResources.QueryBuilderJS

DevExpress.Blazor.Dashboard
DevExpress.Blazor.Reporting.JSBasedControls

800

JSBasedReportingResources.ReportDesignerJS

DevExpress.Blazor.Reporting.JSBasedControls

800

DashboardResources.DashboardJS

DevExpress.Blazor.Dashboard

If you want to register a specific version of a DevExpress resource, start by removing the standard version, then place the new version in the position where the standard version was. Custom scripts should be registered after DevExpress resources:

@DxResourceManager.RegisterScripts((config) => {
    var maxScriptPosition = config.Resources.OrderBy(o => o.Position).Last().Position;
    config.Register(new DxResource("my-custom-script.js", maxScriptPosition + 1));
})

If you want to register a custom script, call the LoadDxResources(IJSRuntime) method before you access the script’s API members for the first time. This method forces the Resource Manager to load client resources:

// ...
@code {
    [Inject] IJSRuntime js;
    protected override async Task OnAfterRenderAsync(bool firstRender) {
        if(firstRender) {
            await js.LoadDxResources();
            await js.InvokeAsync("a-method-from-a-custom-script");
        }
        await base.OnAfterRenderAsync(firstRender);
    }
}

Refer to the following topic for more information: DxResourceManager.

See Also