0

我对 GridView ItemType 属性有疑问:

当我在 html 中设置 ItemType 属性时,由设置的实体的元数据

已加载诸如 DisplayName、Validation 之类的 DataAnnotations,并且一切正常

但是当我在 Page_Load 事件中设置 ItemType 属性时,实体的元数据是

没有加载,我不知道为什么会这样?

多谢

4

1 回答 1

1

I have found the solution

I set the ItemType Property in the OnInit event of the gridview and it is working now

于 2013-03-31T23:01:56.430 回答