我至少已经阅读了4个小时,并且似乎是列表类型,但我有一个情况:
具有集合属性的ObservableCollection.
我定义了第一个DataGrid,并在该部分中
<DataGrid.RowDetailsTemplate>
<DataTemplate>
<!-- second Datagrid here, binding to Level2 property of my Observable collection -->
</DataTemplate>
<DataGrid.RowDetailsTemplate>
Run Code Online (Sandbox Code Playgroud)
一切顺利,屏幕上的所有内容都如我所料......但是:
'EditItem' is not allowed for this view 我错过了什么?
这是我的模特:
public partial class Level1
{
public Level1()
{
this.Level2 = new HashSet<Level2>();
}
public decimal IdLevel1 { get; set; }
public decimal IdLevel2 { get; set; }
public string StrDescripcionTipoAsociado {get;set;}
public virtual Level2 Level2{ get; set; }
}
public partial class Level2
{
public decimal IdLevel1 { …Run Code Online (Sandbox Code Playgroud)