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

Not deleting in Drag and Drop rows in two radgrids

1 Answer 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 21 Oct 2010, 02:25 AM
Hi guys
I am trying to implement drag and drop rows in two grids in both way. It is possible in both direction, to and fro. But my delete is not working. Here is my script. anybody  can help to get deleted.
 

<script type="text/javascript">

            function onRowDropping(sender, args) {
                if (sender.get_id() == "<%=grdPendingOrders.ClientID %>") {
                    var node = args.get_destinationHtmlElement();
                    if (!isChildOf('<%=grdShippedOrders.ClientID %>', node) && !isChildOf('<%=grdPendingOrders.ClientID %>', node)) {
                        args.set_cancel(true);
                    }

                }
                else if (sender.get_id() == "<%=grdShippedOrders.ClientID %>") {
                    var node = args.get_destinationHtmlElement();
                    if (!isChildOf('<%=grdPendingOrders.ClientID %>', node) && !isChildOf('<%=grdShippedOrders.ClientID %>', node)) {
                        args.set_cancel(true);
                    }
                }

                else {
                    var node = args.get_destinationHtmlElement();
                    if (!isChildOf('trashCan', node)) {
                        args.set_cancel(true);
                    }
                    else {
                        if (confirm("Are you sure you want to delete this order?"))
                            args.set_destinationHtmlElement($get('trashCan'));
                        else
                            args.set_cancel(true);
                    }
                }
            }
            function isChildOf(parentId, element) {
                while (element) {
                    if (element.id && element.id.indexOf(parentId) > -1) {
                        return true;
                    }
                    element = element.parentNode;
                }
                return false;
            }

        </script>

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 26 Oct 2010, 07:43 AM
Hello Ben,

Please, refer to the other forum ticket post for additional information. To avoid duplicate posts, I will ask you to continue the communication there.

Kind regards,
Pavlina
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Ben
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or