IncludeHiddenColumns (SPMetal)
Applies to: SharePoint Foundation 2010
Specifies that hidden columns are included in code generation.
Web (SPMetal)
ContentType (SPMetal)
IncludeHiddenColumns (SPMetal)
<IncludeHiddenColumns />
Attributes and Elements
The following sections describe attributes, child elements, and parent elements.
Attributes
None.
Child Elements
None.
Parent Elements
Element |
Description |
---|---|
Specifies that a content type should be included in code generation and modifies which columns in the content type are included in code generation. |
Remarks
A ContentType element cannot have both an ExcludeOtherColumns element and an IncludeHiddenColumns element.
Example
The following shows the IncludeHiddenColumns element in use. The presence of the element ensures that the code that is generated for the Contact content type class will have properties for the content type’s hidden columns.
<?xml version="1.0" encoding="utf-8"?>
<Web AccessModifier="Internal" xmlns="https://schemas.microsoft.com/SharePoint/2009/spmetal">
<ContentType Name="Contact" Class="Contact">
<Column Name="ContId" Member="ContactId" />
<Column Name="ContactName" Member="ContactName1" />
<Column Name="Category" Member="Cat" Type="String"/>
<IncludeHiddenColumns />
</ContentType>
<ExcludeContentType Name="Order"/>
<List Name="Team Members" Type="TeamMember">
<ContentType Name="Item" Class="TeamMember" />
</List>
</Web>