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

Group item does not change its order. Drag & Drop not working

5 Answers 105 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jungho
Top achievements
Rank 1
Jungho asked on 11 Dec 2018, 01:03 AM

I would like to change the order to Drag & Drop between two or more groups in the GridView.

However, the contents of the sample works normally, but the code I wrote does not work.

I do not have any other options, but I do not know why. What did he do wrong? Please help me.

We are using version 2017.2.614.40.

Work Code...

<telerik:RadGridView x:Name="ui_lsvGridView" GroupRenderMode="Flat" RowIndicatorVisibility="Collapsed"
                             CanUserFreezeColumns="False"  
                             AutoGenerateColumns="False"
                             IsFilteringAllowed="{Binding UseGridFilter}"
                             CanUserResizeColumns="true"
                             GridLinesVisibility="Horizontal"                                                             
                             telerik:StyleManager.Theme="Windows8"                                                              
                             SelectionUnit="FullRow"
                             SelectionMode="Single"
                             IsReadOnly="True"
                             ShouldReorderColumnsOnUngrouping="True"
                             ItemsSource="{Binding DataList}"
                             SelectedItem="{Binding SelectedItem, Mode=TwoWay}"     
                             MouseRightButtonDown="ui_lsvGridView_MouseRightButtonDown"
                             MouseDoubleClick="ui_lsvGridView_MouseDoubleClick">
            <telerik:RadGridView.GroupHeaderTemplate>
                <DataTemplate>
                    <TextBlock Foreground="{Binding Group.Key, Converter={StaticResource EmptyValuetoColorStringConverter}}" Text="{Binding Group.Key, Converter={StaticResource EmptyValuetoEmptyConverter}}" FontWeight="Bold" />
                </DataTemplate>
            </telerik:RadGridView.GroupHeaderTemplate>
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Name="rno"  Header="{x:Static Locale:Res.MNU_No}" Width="40" DataMemberBinding="{Binding [rno]}" CellStyle="{StaticResource tGridRowStyle_Number}" IsFilterable="False" IsGroupable="False" >
                    <telerik:GridViewDataColumn.AggregateFunctions>
                        <telerik:CountFunction ResultFormatString="{}{0:N0}"  />
                    </telerik:GridViewDataColumn.AggregateFunctions>
                </telerik:GridViewDataColumn>

..........

5 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 13 Dec 2018, 04:04 PM
Hello Jungho,

Speaking generally, in order to enable drag and drop operations within RadGridView, some custom logic needs to be implemented. You can take a look at the Drag and Drop within RadGridView help article for a more detailed look over the approach. Also, you can check out the Drag Drop with Lines SDK Example. It can be reviewed through the SDK Samples Browser.

Additionally, you may find the Group Headers Drag and Drop forum thread useful on the matter.

I hope this helps, Jungho.

Regards,
Stefan
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Jungho
Top achievements
Rank 1
answered on 14 Dec 2018, 08:00 AM

Hello Stefan

Thank your reply..

Well ...
I seem to have misquoted the question.

There is something I want to do. As shown in the attached picture. I want to change the position of two groups within the 'Gridview Group Panel'. With drag and drop ...

You can navigate between groups within the 'Gridview Group Panel' by running the example source you posted in this forum.
However, if you apply the Telerik version that I use to the example source, you can not move between groups in the Groups panel.

I would like to know if this is a version or a different setting.

 

0
Stefan
Telerik team
answered on 18 Dec 2018, 02:31 PM
Hi Jungho,

Thank you for the clarification and the image provided.

As I understand from the provided information, the obstacle on your end to perform a drag drop operation is the custom defined GroupHeaderTemplate. I tested the behavior of the control with such setup and was not able to reproduce such malfunction. Attached to my reply you can find a sample application I prepared for performing my tests. Can you please check it out? Does it differ in any manner from the setup you are using on your end?

Regards,
Stefan
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Jungho
Top achievements
Rank 1
answered on 19 Dec 2018, 12:48 AM
 I downloaded and run the source you gave me. 
 Since there is no Telerik DLL in the source, I applied my version (version 2017.2.614.40) in your source.
 However, the order of the Group Items in the Group Panel does not change.
 
 Previously, I tested with other sources - the ones that were provided as samples in this forums.
 That sample are allowed to move to the Group Item, and the sample uses the was Trial version dll(2014.3.1202.10).
 However, if I apply my Telerik Dll to that source, it will not work.
 I want to know what I did wrong.
0
Stefan
Telerik team
answered on 21 Dec 2018, 04:06 PM
Hello Jungho,

Thank you for the clarification.

Indeed, there were some fixes that we made after the 2017.2.614.40 version that affect this behavior as well. Can you please try updating the binaries version and let me know how it goes?

Regards,
Stefan
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Jungho
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Jungho
Top achievements
Rank 1
Share this question
or