简体   繁体   中英

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?

http://msdn.microsoft.com/en-us/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.

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. TIA

i have solved the issue already. there is a ListItem.ContentType.Fields.FieldTypeKind property which will return a FieldType enum

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM