Devexpress Winform XtraTreeList 获取点击的单元格值

举例:treelistview设置MouseDoubleClick

使用TreeListHitInfo获取单元格信息:

DevExpress.XtraTreeList.TreeListHitInfo hInfo = this.trlZHCC.CalcHitInfo(new Point(e.X, e.Y));
if(e.Button.IsLeft() && hInfo.HitInfoType == HitInfoType.Cell && hInfo.Column.FieldName=="test")
{
}

获取单元格值:

 var cell1 = hInfo.Node["test1"];
 var cell2 = hInfo.Node["test2"];

 

posted @ 2021-01-25 16:07  舒碧  阅读(495)  评论(0编辑  收藏  举报