jQuery MiniUI

标题: 关于TreeGrid节点拖动的问题 [打印本页]

作者: 双鱼达摩    时间: 2015-3-6 17:48:33     标题: 关于TreeGrid节点拖动的问题

在做一个TreeGrid的例子
用到拖动排序,拖动排序是有一定的条件
但是一直找不到拖动后,投放前的能控制是否允许投放的方法
用ondrop方法判断的话  在跳出判断框时 就已经投放成功了
希望有人能解答
  1. function dropItim(e) {
  2.                 var tree = e.sender;
  3.                 var drag = e.dragNode;
  4.                 var drop = e.dropNode;
  5.         
  6.                 mini.confirm("确定移动排序?", "",
  7.                     function (action) {
  8.                         if (action == "ok") {
  9.                              return true;
  10.                         } else {
  11.                             return false;
  12.                         }
  13.                     })

  14.             }
复制代码


作者: felt    时间: 2015-3-8 13:53:21

在onbeforedrop事件里处理
e.cancel=true可以阻止
作者: 双鱼达摩    时间: 2015-3-9 08:45:45

felt 发表于 2015-3-8 13:53
在onbeforedrop事件里处理
e.cancel=true可以阻止

可以了 谢谢哦




欢迎光临 jQuery MiniUI (http://miniui.com/discuss/) Powered by Discuz! X2