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

RadGrid Drag and Drop Row not working.

1 Answer 338 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 18 Feb 2016, 08:24 PM

I've been trying to figure how to do the simplest drag and drop operation on this grid and its getting really frustrating. It seems all the time I'm supposed to save by using these controls i have to spend in forums and web searches...

To the point: Grid show drag drop animation but rows do not change order. I'm guessing there is something else I have to handle but it is not mentioned neither in your documentation or demo. If it is I would like to get the link to that resource.

As per your documentation:

"Furthermore, depending on the position you drag an item (above or below
other record) it will be placed respectively above or below the
corresponding grid item."

http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/rows/drag-and-drop-of-grid-items

 

My code:

   <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
            <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1">
                <ClientSettings AllowRowsDragDrop="true">
                    <Selecting AllowRowSelect="True" />
                </ClientSettings>
                <MasterTableView AutoGenerateColumns="true" DataSourceID="SqlDataSource1">
                </MasterTableView>
            </telerik:RadGrid>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:GraveyardConnectionString %>" SelectCommand="SELECT * FROM [OrderTest]"></asp:SqlDataSource>
       

What am I missing? And if it is covered somewhere in your documentation please share the link.

 

 

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 23 Feb 2016, 12:25 PM
Hello Christian,

In order to use drag and drop in RadGrid you need to hook on RowDrop server event and rearrange the items of your data source. You can see how to do that in the following live example. Additionally you can find more information in the following forum thread.

Regards,
Kostadin
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Christian
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or