Click here to Skip to main content
13,090,178 members (49,784 online)
Rate this:
Please Sign up or sign in to vote.
I am trying to create a dashboard, But m having problem dragging item from one partial view to another the dragged item disappears after dragging.
    Layout = null;
<script src="~/Scripts/jquery-1.8.0.min.js"></script>
<link href="~/Content/Stylesheets/easyui.css" rel="stylesheet" />
<script src="~/Scripts/jquery.easyui.min.js"></script>
<script src="~/Scripts/ui.droppable.js"></script>
<style type="text/css">
        margin-top: 5px;
        text-decoration: none;
        color: #000;
        background: #9cd86d;
        display: block;
        padding: 1em;
        /* Firefox */
        -moz-box-shadow: 5px 5px 7px rgba(33,33,33,1);
        /* Safari+Chrome */
        -webkit-box-shadow: 5px 5px 7px rgba(33,33,33,.7);
        /* Opera */
        box-shadow: 5px 5px 7px rgba(33,33,33,.7);
        border: 1px solid #ccc;
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
        cursor: move;
        z-index: 999;
        border: 1px solid black;
        height: 200px;
        border: 1px solid #ccc;
        width: 80px;
        background: #fafafa;
        z-index: 999;
<script type="text/javascript">
    jQuery(document).ready(function () {
        //$(function () {
            revert: true,
            deltaX: 20,
            deltaY: 20,
            proxy: function (source) {
                var n = $('<div class="proxy"></div>');
                return n;
            onStopDrag: function (e, source) {
        //$(function () {
            activate: function (event, ui) { alert('dropped');},
            onDrop: function (e, source) {
                $('.dashboardCompletedItemBody').append(" <div class="dragCompleted">" + $(source).html() + "</div>");
                    proxy: function (source) {
                        var n = $('<div class="proxy"></div>');
                        return n;
            over: function( event, ui ) { alert('dropped');}
<div class="CompletedItem">
    <div class="CompletedItemHeader" align="center">Completed</div>
    <div id="easyui-droppable targetareaCompleted">
        <div class="CompletedItemBody" align="center">
[Edit]Code block added[/Edit]
Posted 11-Mar-13 8:44am
Updated 11-Mar-13 8:47am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170813.1 | Last Updated 11 Mar 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100