Jeffrey&Lynny

一个温馨小家庭的.Net生活

导航

Why .Net databinding does not support for class field?

1. the property grid does not display fields
2. One of the reasons why data-binding support is limited to properties happens to be the fact that all of data-binding is built around PropertyDescriptors and not on direct reflection. This allows someone to implement ICustomTypeDescriptor to provide a different OM for the purposes of data-binding than the true set of properties present on the CLR type. For example, DataRowView implements ICustomTypeDescriptor to surface its columns as pseudo-properties that are visible to ASP.NET's data-binding infrastructure (such as GridView/DataGrid columns and DataBinder.Eval). Without this, DataRowView would have two properties - DataView and Index (and the second is the only one remotely interesting for data-binding).

For more information, please refer to:
http://www.nikhilk.net/Entry.aspx?id=42

posted on 2004-10-15 11:18  比尔盖房  阅读(424)  评论(0编辑  收藏  举报