Ray Booysen
Ray Booysen

Reputation: 30031

ReadOnly Property in Custom Column Types in Sharepoint

I'm creating a custom column in a feature for Sharepoint. It is essentially this:

<Field 
  Type="Integer" 
  ID="<insert guid here>" 
  ReadOnly="true"
  Name="xxx"
  DisplayName="XXX"
  Group="YYY" />

When the field is deployed and attached to a content type, the content type shows no instance of this field being attached. The documentation about ReadOnly is a bit vague but definitely states that the column will be available for viewing in a View. However, when I create a view it is not available.

The moment I remove ReadOnly from the field, it is available on the content type without any problems. Any ideas?

Upvotes: 1

Views: 4642

Answers (2)

dahlbyk
dahlbyk

Reputation: 77590

Have you tried putting ReadOnly on the content type's FieldRef instead of the Field element?

Upvotes: 0

Nat
Nat

Reputation: 14305

I have tried out the same schema in a dev box using SharePoint designer to create it. I have issues seeing the column until I change the type from "Integer" to "Number"

Not sure "Integer" is supported.

Upvotes: 1

Related Questions