Note that there are some explanatory texts on larger screens.

plurals
  1. POProblem displaying custom property values for SharePoint custom field types
    primarykey
    data
    text
    <p>I'm trying to create a custom field type in SharePoint (WSS 3.0) that has custom properties. I have created my fldtypes*.xml file based on the SDK docs and <a href="http://claytonj.wordpress.com/2007/05/15/regular-expression-validation-custom-field-type/" rel="nofollow noreferrer">this blog post</a> and it seems to render fine and I can retrieve the custom property values inside my code. My problem is that after the initial field creation, if I go back to the list settings page and click on my newly added field, the form shows my custom properties with some value that I'm not providing it. For example, if my custom property's display name is "My Custom Prop" then the value in its textbox will be "My Custom Prop field value".</p> <p>My question is this: how can I properly show the actual string values of my custom property types in these textboxes?</p> <p>Here's my fldtypes*.xml file:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;FieldTypes&gt; &lt;FieldType&gt; &lt;Field Name="TypeName"&gt;MyCustomField&lt;/Field&gt; &lt;Field Name="TypeDisplayName"&gt;My Custom Field&lt;/Field&gt; &lt;Field Name="TypeShortDescription"&gt;MyCustomField&lt;/Field&gt; &lt;Field Name="ParentType"&gt;Text&lt;/Field&gt; &lt;Field Name="UserCreatable"&gt;TRUE&lt;/Field&gt; &lt;Field Name="FieldTypeClass"&gt;MyCustomField.CustomFields.MyCustomField, MyCustomField, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d772gbab82fe6996&lt;/Field&gt; &lt;PropertySchema&gt; &lt;Fields&gt; &lt;Field Name="MyCustomProp" DisplayName="My Custom Prop" Type="Text" MaxLength="50" DisplaySize="30" /&gt; &lt;/Fields&gt; &lt;/PropertySchema&gt; &lt;/FieldType&gt; &lt;/FieldTypes&gt; </code></pre> <p>And here's the code for my field type class:</p> <pre><code>public class MyCustomField : SPFieldText { private string propval; public MyCustomField(SPFieldCollection fields, string fieldName) : base(fields, fieldName) { } public MyCustomField(SPFieldCollection fields, string typeName, string displayName) : base(fields, typeName, displayName) { } public override void Update() { // I can see any updated value here propval = GetCustomProperty("MyCustomProp") as string; base.Update(); } public override Type FieldValueType { get { return typeof (string); } } } </code></pre> <p>What can I do to see the correct custom property values in my "Change Column" page (FldEditEx.aspx) in my SharePoint app?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload