1
有人能請我幫忙嗎?jqgrid作爲數據源的對象列表(帶有子對象)
我有2個班,Foo和武
public class Foo
{
public int Id { get; set; }
public int price { get; set; }
public String code { get; set; }
public Moo moo { get; set; }
public Foo()
{
}
}
public class MOO
{
public int Id { get; set; }
public String firstname { get; set; }
public String surname { get; set; }
public MOO()
{
}
}
我有FOOS名單現在
List<Foo> foolist
我可以爲我的jqGrid一個數據源。做列價格和代碼,但我不能使用子場
我希望能夠做這樣的事
<trirand:JQGridColumn DataField="moo.firstname" Searchable="true" />
什麼想法? 謝謝!
沒有你設法讓這種隨時隨地。我受到同樣的問題,並在這裏發佈了一個例子:http://stackoverflow.com/questions/9958084/null-reference-binding-jqgrid-to-object-that-contains-sub-objects。 – 2012-03-31 17:31:43