[英]how do you get the field type (integer, datetime, choice) from the class Microsoft.SharePoint.Client.ListItem?
as the topic suggest, may i know how do i get the field type (integer, datetime, choice) from a listItem? 正如主题所暗示的,我是否可以知道如何从listItem获取字段类型(整数,日期时间,选择)?
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.listitem(v=office.15).aspx http://msdn.microsoft.com/zh-cn/library/microsoft.sharepoint.client.listitem(v=office.15).aspx
i would need to know the field type because i need to anticipate it in order to load the appropriate controls (DateTime, Choice, Radio etc) for each individual item. 我需要知道字段类型,因为我需要预料一下以便为每个单独的项目加载适当的控件(DateTime,Choice,Radio等)。
for example, if a ListItem is a DateTime, then i will load a DateTimePicker control in the row of my table for user to select. 例如,如果ListItem是DateTime,则我将在我的表行中加载DateTimePicker控件供用户选择。 TIA TIA
i have solved the issue already. 我已经解决了这个问题。 there is a ListItem.ContentType.Fields.FieldTypeKind property which will return a FieldType enum 有一个ListItem.ContentType.Fields.FieldTypeKind属性,它将返回一个FieldType枚举
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.