0
有沒有一種方法來使用jquery對話框模式,而不是javascript確認消息與樹視圖?當用戶在樹上拖拽節點到另一個節點時,我正在執行客戶端事件「OnClientNodeDropping」,我想要做的是顯示一個jquery對話框,要求用戶確認移動。我希望模態對話框的OK和Cancel按鈕將值傳遞給args.set_cancel(dialog_result);當我嘗試這個頁面時,在對話框可以返回true或false確認之前執行該頁面。我怎樣才能換出老同學確認一個jQuery模態對話框Telerik TreeView顯示jQuery模式,而不是javascript確認OnNodeDropped
,我立刻注意到function OnNodeDropped(sender, args) {
var srcNode = args.get_sourceNode();
var destNode = args.get_destNode();
var dNode = destNode._contentElement.innerHTML.indexOf("inActiveCategory");
if (dNode >= 0) {
//Call a modal dialog here and return true of false instead of using the old school confirm
var result = confirm("This category is inactive. Moving to " + destNode.get_text() + " will set " + srcNode.get_text() + " to inactive as well! ");
//get the return value from the dialog, is it canceled or ok
args.set_cancel(dialog_result);
}
}