//TODO:Validate ColumnIndex public static DataGridCell GetRowCellByColumnIndex(this DataGridRow row, int columnIndex) { if (row != null) { DataGridCellsPresenter cellPresenter = row.GetVisualChild <DataGridCellsPresenter>(); if (cellPresenter != null) { return((DataGridCell)cellPresenter.ItemContainerGenerator.ContainerFromIndex(columnIndex)); } } return(null); }