Sorting Not Working

3 posts, 0 answers
  1. Peter
    Peter avatar
    2 posts
    Member since:
    Apr 2011

    Posted 19 Feb 2013 Link to this post

    I can sort when I use a standard DataGrid, but when I use a Telerik RadGridView, I can not sort.  Why is that?

     

     

     

    <sdk:DataGrid x:Name="rgvSearchResults" Grid.Row="1" AutoGenerateColumns="False" SelectionMode="Single"

     

     

     

    SelectionChanged="rgvSearchResults_SelectionChanged_1" CanUserSortColumns="True">

     

     

     

     

    <sdk:DataGrid.Columns>

     

     

     

     

    <sdk:DataGridTextColumn Header="Division" Binding="{Binding Attributes[DIVISION]}" CanUserSort="True"></sdk:DataGridTextColumn>

     

     

     

     

    <sdk:DataGridTextColumn Header="District" Binding="{Binding Attributes[DISTRICT]}" CanUserSort="True"></sdk:DataGridTextColumn>

     

     

     

     

    <sdk:DataGridTextColumn Header="System" Binding="{Binding Attributes[SYS_NM]}" CanUserSort="True"></sdk:DataGridTextColumn>

     

     

     

     

    <sdk:DataGridTextColumn Header="Sub-System" Binding="{Binding Attributes[SUBSYS_NM]}" CanUserSort="True"></sdk:DataGridTextColumn>

     

     

     

     

    <sdk:DataGridTextColumn Header="Line" Binding="{Binding Attributes[LINE_NAME]}" CanUserSort="True"></sdk:DataGridTextColumn>

     

     

     

     

    <sdk:DataGridTextColumn Header="Begin Series" Binding="{Binding Attributes[BEGIN_SERIES]}" CanUserSort="True"></sdk:DataGridTextColumn>

     

     

     

     

    <sdk:DataGridTextColumn Header="Begin Station" Binding="{Binding Attributes[BEGIN_STATION]}" CanUserSort="True"></sdk:DataGridTextColumn>

     

     

     

     

    <sdk:DataGridTextColumn Header="End Series" Binding="{Binding Attributes[END_SERIES]}" CanUserSort="True"></sdk:DataGridTextColumn>

     

     

     

     

    <sdk:DataGridTextColumn Header="End Station" Binding="{Binding Attributes[END_STATION]}" CanUserSort="True"></sdk:DataGridTextColumn>

     

     

     

     

    </sdk:DataGrid.Columns>

     

     

     

     

    </sdk:DataGrid>

     


     

     

     

    <telerik:RadGridView x:Name="rgvSearchResults" Grid.Row="1" AutoGenerateColumns="False" RowIndicatorVisibility="Collapsed"

     

     

     

    SelectionChanged="rgvSearchResults_SelectionChanged" CanUserSortColumns="True" IsFilteringAllowed="True" IsReadOnly="True" ShowGroupPanel="False">

     

     

     

     

    <telerik:RadGridView.Columns>

     

     

     

     

    <telerik:GridViewDataColumn Header="Division" DataMemberBinding="{Binding Attributes[DIVISION]}"></telerik:GridViewDataColumn>

     

     

     

     

    <telerik:GridViewDataColumn Header="District" DataMemberBinding="{Binding Attributes[DISTRICT]}"></telerik:GridViewDataColumn>

     

     

     

     

    <telerik:GridViewDataColumn Header="System" DataMemberBinding="{Binding Attributes[SYS_NM]}"></telerik:GridViewDataColumn>

     

     

     

     

    <telerik:GridViewDataColumn Header="Sub-System" DataMemberBinding="{Binding Attributes[SUBSYS_NM]}"></telerik:GridViewDataColumn>

     

     

     

     

    <telerik:GridViewDataColumn Header="Line" DataMemberBinding="{Binding Attributes[LINE_NAME]}"></telerik:GridViewDataColumn>

     

     

     

     

    <telerik:GridViewDataColumn Header="Begin Series" DataMemberBinding="{Binding Attributes[BEGIN_SERIES]}"></telerik:GridViewDataColumn>

     

     

     

     

    <telerik:GridViewDataColumn Header="Begin Station" DataMemberBinding="{Binding Attributes[BEGIN_STATION]}"></telerik:GridViewDataColumn>

     

     

     

     

    <telerik:GridViewDataColumn Header="End Series" DataMemberBinding="{Binding Attributes[END_SERIES]}"></telerik:GridViewDataColumn>

     

     

     

     

    <telerik:GridViewDataColumn Header="End Station" DataMemberBinding="{Binding Attributes[END_STATION]}"></telerik:GridViewDataColumn>

     

     

     

     

    </telerik:RadGridView.Columns>

     

     

     

     

    </telerik:RadGridView>

     


  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 20 Feb 2013 Link to this post

    Hi,

     Can you post more info about the collection bound to the grid in your case? 

    All the best,
    Vlad
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. Peter
    Peter avatar
    2 posts
    Member since:
    Apr 2011

    Posted 20 Feb 2013 Link to this post

    It is a collection of objects that Inherits System.Windows.DependencyObject.  I read before on these forumns that if the standard DataGrid sorts, the Telerik RadGridView should sort too. 

    Just want you to know, (I'm thinking it is the same issue) that the filtering is not showing up either.

Back to Top