SortOrder is not a Parameter

2 posts, 0 answers
  1. Matthias
    Matthias avatar
    1 posts
    Member since:
    Jun 2018

    Posted 21 Jan 2020 Link to this post

    Hi guys,

    after updating the Blazor nuget package to version 2.6.1 the SortOrder property of IGridBoundColumn is missing the [Parameter] attribute.

    If i set the SortOrder: 

    <GridColumn SortOrder="@Sort.None" Filterable="false" Field="@col.PropertyPath" Title="@col.HeaderText">
        <Template>
            @* Content goes here *@
        </Template>
    </GridColumn>

    I get the following exception:

    2020-01-21 09:47:29.5899|100|WARN|Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer|Unhandled exception rendering component: Object of type 'Telerik.Blazor.Components.GridColumn' has a property matching the name 'SortOrder', but it does not have [ParameterAttribute] or [CascadingParameterAttribute] applied. System.InvalidOperationException: Object of type 'Telerik.Blazor.Components.GridColumn' has a property matching the name 'SortOrder', but it does not have [ParameterAttribute] or [CascadingParameterAttribute] applied.
       at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.ThrowForUnknownIncomingParameterName(Type targetType, String parameterName)
       at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.SetProperties(ParameterView& parameters, Object target)
       at Microsoft.AspNetCore.Components.ParameterView.SetParameterProperties(Object target)
       at Microsoft.AspNetCore.Components.ComponentBase.SetParametersAsync(ParameterView parameters)
       at Microsoft.AspNetCore.Components.Rendering.ComponentState.SetDirectParameters(ParameterView parameters)
       at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewComponentFrame(DiffContext& diffContext, Int32 frameIndex)
       at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewSubtree(DiffContext& diffContext, Int32 frameIndex)
       at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)
       at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)
       at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)
       at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl)
       at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRange`1 oldTree, ArrayRange`1 newTree)
       at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment)
       at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
       at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()

     

    Is there a new / other way to control sorting of the columns i missed?

    Best Regards,

    Matt

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    5940 posts

    Posted 21 Jan 2020 Link to this post

    Hi Matt,

    SortOrder is not a parameter on a column that you should use. To set sorting programmatically, please Follow this feature request (I added your Vote for you): https://feedback.telerik.com/blazor/1411678-ability-to-set-the-sorted-columns-programatically. The feature is not yet available in the grid, at this stage only the user can set sorting through an action (click on the column header).

    Regards,
    Marin Bratanov
    Progress Telerik

     UI for Blazor
Back to Top