This is a migrated thread and some comments may be shown as answers.

SortOrder is not a Parameter

1 Answer 163 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matthias
Top achievements
Rank 1
Matthias asked on 21 Jan 2020, 08:56 AM

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

1 Answer, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 21 Jan 2020, 10:05 AM

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
Tags
Grid
Asked by
Matthias
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or