views:

2462

answers:

3

Hey all

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?

+1  A: 

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.

Nat
Thanks Nat, will give that a try.
Ray Booysen
A: 

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

dahlbyk
Hi Dahlbyk. I have and this also does not work. Once I get back into the office, I'll be trying Nat's answer.
Ray Booysen
A: 

You can use Infowise Smart List Pro which extends the SharePoint lists & document libraries, and gives them abilities like - field/column permissions, default values, view permissions, tabbed interface and much more.

You can use the column permissions to set a field to be read only to a specific group or user. it will do the job.

http://www.infowisesolutions.com/product.aspx?id=SmartListPro