We have an observable collection that consists of a custom class called Row which is used as itemsource in our Datagrid. The Row class itself consists of 3 different cell types.
public class Row
{
public TimeCell TimeCell { get; set; }
public PositionsCell PositionsCell { get; set; }
public TemperatureCell TempCell { get; set; }
}
These cell types all have the parent class Cell which contains the majority of properties. Our Datagrid consists of template columns representing each of the cells in Row with relevant bindings. The problem is that when we do Datagrid Selecteditem we currently get a Model.Row returned whereas we would like to get the cell directly (Model.Row.TimeCell) for example if a cell in that column was clicked/selected. How can we achieve this?