RadGrid Drag and Drop Row not working.

2 posts, 0 answers
  1. Christian
    Christian avatar
    1 posts
    Member since:
    Feb 2016

    Posted 18 Feb 2016 Link to this post

    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."



    My code:

       <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
                <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1">
                    <ClientSettings AllowRowsDragDrop="true">
                        <Selecting AllowRowSelect="True" />
                    <MasterTableView AutoGenerateColumns="true" DataSourceID="SqlDataSource1">
                <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.



  2. Kostadin
    Kostadin avatar
    1733 posts

    Posted 23 Feb 2016 Link to this post

    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.

    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
Back to Top