Telerik RadTreeView 拖放节点
将 RadTreeView 节点拖动到另一个节点时覆盖默认文本并创建“视觉提示”的最佳方法是什么? 我首先是:
...
telerik:RadTreeView OnClientNodeDragging="ClientNodeDragging"
...
function ClientNodeDragging(sender, args)
{
if (!visualClue)
{
visualClue = createVisualClue();
document.body.insertBefore(visualClue, document.body.firstChild);
}
visualClue.style.left = args._domEvent.screenX + "px";
visualClue.style.top = args._domEvent.screenY + "px";
}
如何在屏幕上显示文本?
目前,它位于可拖动节点下方约 20 px,并且现有的拖动文本 (RadTreeView) 仍然显示(显示节点文本的名称 - 我希望将其删除或覆盖/隐藏)。
更新 好的,我现在已经使用了 args._domEvent.clientX 和 .clientY 。关闭,但现在我需要一种删除 RadTreevIew 自己的文本的方法。
What's the best way to override the default text and create a "Visual Cue" when Dragging a RadTreeView Node to another.
I've started by:
...
telerik:RadTreeView OnClientNodeDragging="ClientNodeDragging"
...
function ClientNodeDragging(sender, args)
{
if (!visualClue)
{
visualClue = createVisualClue();
document.body.insertBefore(visualClue, document.body.firstChild);
}
visualClue.style.left = args._domEvent.screenX + "px";
visualClue.style.top = args._domEvent.screenY + "px";
}
Is the way to go about displaying the text on screen?
At the moment it's approx 20 px below the draggable node and the existing drag text (RadTreeView) still displays (displays the name of the node text - I want it removed or overridden/hidden).
UPDATE
OK I've used args._domEvent.clientX
and .clientY
now. Close, but now I need a way of removing the RadTreevIew's own text.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我设法使用 IE 的调试器(也可以使用任何其他调试器)将其解决,并注意到发件人有这个 _draggingClue - BINGO!
所以剩下的就是像这样设计它:
希望这可以帮助某人,也许我自己在这么多年的时间里;)
I Managed to sort it out by using IE's debugger (could have used any other debugger) and noticed the sender has this _draggingClue - BINGO!!
So all that was left was to style it like this:
Hope this helps someone and perhaps myself in so many years time ;)