简体   繁体   English

如何从类Microsoft.SharePoint.Client.ListItem中获取字段类型(整数,日期时间,选择)?

[英]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.

相关问题 如何从Microsoft.SharePoint.Client.ListItem检索所有属性? - How to retrieve all properties from Microsoft.SharePoint.Client.ListItem? 如何将 Microsoft.Sharepoint.Client.ListItem 转换为 Microsoft.Sharepoint.Client.File? - How to convert from Microsoft.Sharepoint.Client.ListItem to Microsoft.Sharepoint.Client.File? 如何序列化Microsoft.SharePoint.Client.ListItem(Sharepoint-2013)? - How to Serialize Microsoft.SharePoint.Client.ListItem (Sharepoint-2013)? C# - 将文件作为附件添加到 Microsoft.SharePoint.Client.ListItem (SharePoint 2010) - C# - Add a File as Attachment to Microsoft.SharePoint.Client.ListItem (SharePoint 2010) 如何从Sharepoint 2013的DateTime字段中获取唯一日期? - How to get only date from DateTime Field of Sharepoint 2013? 如何从 Microsoft.Sharepoint.Client.ZC6E190B28404933C48EZCE895E 中填充 Web class - How to shim the Web class from Microsoft.Sharepoint.Client.Web? 如何从Microsoft.SharePoint.Client.File对象获取文件大小? - How do I get the filesize from the Microsoft.SharePoint.Client.File object? 来自 c# 的 Sharepoint 更改 listitem 字段 - Sharepoint change listitem field from c# 在 Microsoft Graph 中获取 ListItem 的多个查找字段 - Get Multiple Lookup field for a ListItem in Microsoft Graph Microsoft Graph REST API v1.0 获取列表项(10.000.000 列表项来自 SharePoint 列表) - Microsoft Graph REST API v1.0 Get listItem(10.000.000 List Item from a SharePoint list)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM