PropertySortDescriptor on RadDataGrid

1 Answer 75 Views
DataGrid
Larry
Top achievements
Rank 1
Iron
Iron
Veteran
Larry asked on 04 Jun 2022, 12:19 AM

The code below returns an error:

A value of type 'PropertySortDescriptor' cannot be added to a collection or dictionary of type 'SortDescriptorCollection'.

                <telerik:RadDataGrid.SortDescriptors>
                    <telerik:PropertySortDescriptor PropertyName="PracticeLogId" SortOrder="Descending" />
                </telerik:RadDataGrid.SortDescriptors>

?

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Didi
Telerik team
answered on 06 Jun 2022, 08:45 AM

Hi Larry,

The namespace of the DataGrid PropertySortDescriptor is not added to the common telerik schema.

Now for DataGrid sorting/filtering/grouping use this namespace: 

xmlns:telerikCommon="clr-namespace:Telerik.XamarinForms.Common.Data;assembly=Telerik.Maui.Controls.Compatibility"


<telerik:RadDataGrid.FilterDescriptors>
<telerikCommon:DistinctValuesFilterDescriptor />
</telerik:RadDataGrid.FilterDescriptors>

<telerik:RadDataGrid.GroupDescriptors>
<telerikCommon:PropertyGroupDescriptor />
</telerik:RadDataGrid.GroupDescriptors>

<telerik:RadDataGrid.SortDescriptors>
<telerikCommon:PropertySortDescriptor />
</telerik:RadDataGrid.SortDescriptors>

Note that we are working on changing the namespace, it will be live in some of the upcoming releases. It will be addressed in the release notes. 

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
DataGrid
Asked by
Larry
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Didi
Telerik team
Share this question
or