TreeListNode.HasAsParent详解
作者:C/S框架网  发布日期:2015/01/11 00:13:00
  TreeListNode.HasAsParent详解


TreeListNode元数据:

C# Code:

//
// 摘要:
// Determines whether the current node has a DevExpress.XtraTreeList.Nodes.TreeListNode
// instance as a parent.
//
// 参数:
// node:
// The DevExpress.XtraTreeList.Nodes.TreeListNode instance to check.
//
// 返回结果:
// true if the current node has a DevExpress.XtraTreeList.Nodes.TreeListNode
// instance as a parent; otherwise, false.
public bool HasAsParent(TreeListNode node)
{

}




TreeListNode.HasAsParent(TreeListNode node)

解释:检查参数中的节点是否当前节点的父节点。若node参数是当前节点的父节点,则HasAsParent方法返回True。

使用方法:

C# Code:

//检查修改后的结点是当前结点的子结点
if (nodeNew.HasAsParent(nodeOld))
{
   this.SetEditorBindingValue(txtParentGroupCode, codeOld);//还原数据
   e.Cancel = true;
   Msg.Warning("乱套了!不能修改为它的子结点!");
}

//来源:C/S框架网(www.csframework.com) QQ:1980854898




C/S框架网|原创精神.创造价值.打造精品


扫一扫加作者微信
C/S框架网作者微信 C/S框架网|原创作品.质量保障.竭诚为您服务


上一篇 下一篇