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

[Solved] RadDataGrid sorting issue on DataGridTemplateColumn.

6 Answers 174 Views
Grid for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Balraj
Top achievements
Rank 1
Balraj asked on 10 Nov 2013, 02:00 PM
I am using RadDataGrid to display values in tabular form. I have added Sorting to two column that are DataGridTemplateColumn using PropertySortDescriptor. Now what is happening is the data is getting sorted when i click on one column but if now i click on second column the  sort icon from the first column is not getting disappear and sort as per second column. How to fix this?
Code as below and snapshot attached:

  <telerikGrid:RadDataGrid Grid.Column="1" Grid.Row="3" x:Name="DataGrid"
                                 HorizontalAlignment="Left"
                                 VerticalAlignment="Stretch"
                                SelectionMode="Single"
                              LayoutUpdated="DataGrid_LayoutUpdated"
                                 UserSortMode="Single"
                                 UserFilterMode="Disabled"
                                 UserGroupMode="Disabled"
                                 UserColumnReorderMode="None"
                                 GridLinesVisibility="Horizontal"
                                 AlternateRowBackground="#fcf3f3"
                                 AlternationStartIndex="1"
                                 AlternationStep="2"
                                 RowBackground="#ffffff"
                                 EnsureCurrentItemIntoView="False"
                                ManipulationMode="None"
                                 GroupHeaderDisplayMode="Frozen"
                                 AutoGenerateColumns="False"
                                 Background="Transparent"
                                GridLinesBrush="#99908a"
                                 Foreground="#65594d"
                                 BorderThickness="0"
                                 GridLinesThickness="1"
                                  Margin="0,0,6,20">

 <telerikGrid:DataGridTemplateColumn
                                                CellContentTemplateSelector="{StaticResource UpDownInvoiceSalesTemplateSelector}"
                                                HeaderStyle="{StaticResource HeaderStyleTopProduct}">
                    <telerikGrid:DataGridTemplateColumn.Header>
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                            <TextBlock Text="{Binding ElementName=thisPage, Path=Property1HeaderName}" Style="{StaticResource ReportTypeStyleTextTopProduct}"/>
                        </StackPanel>
                    </telerikGrid:DataGridTemplateColumn.Header>
                    <telerikGrid:DataGridTemplateColumn.SortDescriptor>
                        <telerikGrid:PropertySortDescriptor PropertyName="Property1"/>
                    </telerikGrid:DataGridTemplateColumn.SortDescriptor>
                </telerikGrid:DataGridTemplateColumn>

                <telerikGrid:DataGridTemplateColumn
                                                    CellContentTemplateSelector="{StaticResource UpDownSecondaryValueTopProductTemplateSelector}"
                                                    HeaderStyle="{StaticResource HeaderStyleTopProduct}">
                    <telerikGrid:DataGridTemplateColumn.Header>
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                            <TextBlock Text="{Binding ElementName=thisPage, Path=Property2HeaderName}" Style="{StaticResource ReportTypeStyleTextTopProduct}"/>
                          
                        </StackPanel>
                    </telerikGrid:DataGridTemplateColumn.Header>
                    <telerikGrid:DataGridTemplateColumn.SortDescriptor>
                        <telerikGrid:PropertySortDescriptor PropertyName="Property2"/>
                    </telerikGrid:DataGridTemplateColumn.SortDescriptor>
                </telerikGrid:DataGridTemplateColumn>

6 Answers, 1 is accepted

Sort by
0
Rosy Topchiyska
Telerik team
answered on 11 Nov 2013, 05:36 PM

Hi Balraj,

Thank you for the question.

We have to admit that there is a bug with the RadDataTemplateColumn. I have redirected this issue to our development team and they will do their best to fix it for the next official release. Meanwhile, if we release an internal build, I will contact you in this forum thread.

Please, feel free to contact us if you have any other questions. I have also updated your telerik points as a token of gratitude for bringing this issue to our attention.

Regards,
Rositsa Topchiyska
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Balraj
Top achievements
Rank 1
answered on 11 Nov 2013, 06:47 PM
Thanks for the reply will be looking for your bug fix ASAP
0
Balraj
Top achievements
Rank 1
answered on 14 Nov 2013, 10:27 AM
Hello, As mentioned earlier can we get some work around for this issue now. Its quite urgent else we need to remove this control from our project and use something else. Waiting for your reply urgently
0
Rosy Topchiyska
Telerik team
answered on 14 Nov 2013, 02:08 PM
Hi Balraj,

We have investigated the problem and we found out what causes this issue. Unnfortunately we cannot suggest a workaround. Our developers have addressed the bug and the fix will be available in the next internal build and also in the next official release.

We apologize for any inconvenience caused.

Regards,
Rositsa Topchiyska
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Balraj
Top achievements
Rank 1
answered on 14 Nov 2013, 02:39 PM
Can you let me know when can i expect the next build any date??
0
Ivaylo Gergov
Telerik team
answered on 19 Nov 2013, 11:04 AM
Hi Balraj,

We plan to release an internal build in the beginning of December. Note, that it will be available for download only for customers or users that are in trial. From your download history I noticed that you do not have registered downloads and your account is not associated with any company. If you are a member of a company that have a license you can send us details in order to update your account. Thus, you will be able to download the internal build.


 

Regards,
Ivaylo Gergov
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Grid for XAML
Asked by
Balraj
Top achievements
Rank 1
Answers by
Rosy Topchiyska
Telerik team
Balraj
Top achievements
Rank 1
Ivaylo Gergov
Telerik team
Share this question
or