【发布时间】:2013-07-24 16:22:14
【问题描述】:
当我单击任何 GridControl 单元格时,我遇到了与 DevExpress GridControl 相关的问题,然后它将返回单击的列索引?
【问题讨论】:
标签: wpf devexpress gridcontrol
当我单击任何 GridControl 单元格时,我遇到了与 DevExpress GridControl 相关的问题,然后它将返回单击的列索引?
【问题讨论】:
标签: wpf devexpress gridcontrol
您可以使用GridView.CalcHitInfo() 方法返回的点击信息来识别点击的column 和此列visible index:
GridHitInfo hitInfo = gridView1.CalcHitInfo(new Point(e.X, e.Y));
if(hitInfo.InRowCell){
int columnIndex = hitInfo.Column.VisibleIndex;
//...
}
相关帮助文章:Hit Information Overview
相关方法:Identify the Grid's Element Located Under the Mouse Cursor
【讨论】: