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"];
量变会引起质变。