1.获取字段的VisibleIndex属性
private void gridView1_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e)
{
if (e.Column.VisibleIndex == 4)//文件点击事件
{
string wi_file_oldname = this.gridView1.GetRowCellValue(e.RowHandle, "wi_file_oldname").ToString();
string wi_file_name = this.gridView1.GetRowCellValue(e.RowHandle, "wi_file_name").ToString();
if (string.IsNullOrWhiteSpace(wi_file_name)||string.IsNullOrWhiteSpace(wi_file_oldname)) return;