Hello,
I have a little problem with DetailDescription. So, I bind a observablecollaction in datagrid which type is “ExtendedEvent” and ExtendedEvent class has a sublist what I would like to show in tree strucutre. I saw the sample from datagrid examples and I will not get ParentRow from object parentItem just the selected extendedevent value.
public class EmployeesDetailDescription : DataGridDetailDescription
{
public EmployeesDetailDescription()
{
this.RelationName = "DependentEvents";
}
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
{
base.OnPropertyChanged(e);
}
protected override IEnumerable GetDetailsForParentItem( DataGridCollectionViewBase parentCollectionViewBase, object parentItem )
{
// var datarow = parent as DataRow; // got nullexception
var selectedItem = parentItem as ExtendedEvent;
/* DataView dataView = new DataView(
parentRowView.Row.Table,
"ReportsTo = " + selectedItem.DependentEvents,
null,
DataViewRowState.CurrentRows );*/
return null;
}
}
So, i would like to ask, how could I paste my sublist under to curent row with tree?
Best Regards.