2

I have a dataform that is bound to a list of objects. The fields on the dataform are generated for the primitive properties (name, description, etc). However, this object also includes a complex object that has its own properties. How do I tell the dataform to autogenerate the primitive properties for this as well?

public class Order
{
  public int OrderId {get; set;}
  public string Name {get; set;}
  public OrderDetail OrderDetails {get; set;}
}

public class OrderDetail
{
   public int OrderDetailId {get; set;}
   public int OrderId {get; set;}
   public double Cost {get; set;}
}
4

1 に答える 1

0

これは Entity Framework とは何の関係もないと思います。これは純粋な DataForm の問題です。

オンラインで見回すと、DataForms はデフォルトで複雑なプロパティをレンダリングしないようです。ビュー テンプレートを変更して、何をすべきかを伝える必要があります。

https://stackoverflow.com/questions/3867146/can-or-should-dataforms-be-nestedを参照してください

于 2011-06-10T19:48:26.047 に答える