开发者

DataForm, DropBox and data annotations (description and such)

开发者 https://www.devze.com 2023-02-13 20:25 出处:网络
I\'ve got a DataForm in which I replace some TextBox fields with DropBoxes to imitate a lookup using the AutoGeneratingField event.

I've got a DataForm in which I replace some TextBox fields with DropBoxes to imitate a lookup using the AutoGeneratingField event.

However, when I do that, I loose any data annotations that could otherwise be used (such as a description which I specified in my data model).

Is there a way to get these values from the data model without resorting to auto-generated fields? The DataFormAutoGeneratingFieldEventArgs开发者_JS百科 parameter doesn't seem to contain them.


Set the DataField.PropertyPath property to the name of the model property with metadata.

0

精彩评论

暂无评论...
验证码 换一张
取 消