Completed
Last Updated: 13 Feb 2018 12:49 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 05 Feb 2018 08:57
Category: DataFilter
Type: Bug Report
1
FIX. RadDataFilter - SortOrder property doesn't take effect when the SortFieldNames is set to true
To reproduce: set the DataSource property and enable the sorting for the fields drop-down items:

        Me.RadDataFilter1.SortOrder = SortOrder.Descending
        Me.RadDataFilter1.SortFieldNames = True

When you activate the drop-down editor to select a field name, you will notice that the items are always sorted ascending no matter the SortOrder.

Note: RadDataFilter should allow you to sort the drop-down items in descending order. 

Workaround:

    Private Sub RadForm1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        AddHandler Me.RadDataFilter1.EditorInitialized, AddressOf EditorInitialized
    End Sub

    Private Sub EditorInitialized(sender As Object, e As Telerik.WinControls.UI.TreeNodeEditorInitializedEventArgs)
        Dim editor As TreeViewDropDownListEditor = TryCast(e.Editor, TreeViewDropDownListEditor)
        If editor IsNot Nothing Then
            Dim element As BaseDropDownListEditorElement = TryCast(editor.EditorElement, BaseDropDownListEditorElement)
            element.ListElement.SortStyle = Telerik.WinControls.Enumerations.SortStyle.Descending           
        End If
    End Sub
1 comment
ADMIN
Ralitsa
Posted on: 13 Feb 2018 12:49
Hi, 

In order to control the sort order of field names, you need to set the FieldNamesSortStyle property to desired value. Here is the code snippet how can be achieved: 

this.radDataFilter1.SortFieldNames = true;
this.radDataFilter1.FieldNamesSortStyle = Telerik.WinControls.Enumerations.SortStyle.Descending;

The SortOrder property sorts the nodes collection and can not be used for the popup. The newly added property will be available with R1 2018 SP1 version. 

Best regards, 
WinForms team