Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Customize the display pattern of Multi line text field

  Asked By: Dennis    Date: May 24    Category: Sharepoint    Views: 3550

I am looking to customize the display pattern of multi line text field
in list view to display only first 100 characters followed by a link
that expands the full text. Now, I have modified fldtypes.xml for this
behaviour. According to the best practices, I want to not modify
fldtypes.xml. I do not want to change the default options and features
of "Multi Line Text" field. How can I accomplish this requirement?

Also I have looked at creating a custom site column that inherits from
SPMultilineText field. But there is no method that customizes the
display of field in list views.



4 Answers Found

Answer #1    Answered By: Julia Washington     Answered On: May 24

If you create a custom field  type that inherits from the SPMultilineText field
you can register it using a file that starts with fldtypes and ends with .xml.
Something like fldtypes_Custom.xml. SharePoint will pick up the new field that
way and you can change the rendering pattern  just like you did in fldtypes.xml.

Answer #2    Answered By: Shashwat Takle     Answered On: May 24

I have already implemented your idea. But
the main problem is that when I inherit from SPFieldMultiLineText I
lose the rendering of field  type properties. So essentially the end
user will not be able to see options like 1.Number of lines for
editing 2. Specify the type of text  to allow etc.

It would be very helpful if you can let me know( may be an example)
how I would accomplish the default property renderings and pass/set
those values to field type properties.

Answer #3    Answered By: Aastha Acharya     Answered On: May 24

I haven't had a call for implementing a multilinetext custom field  type at this
point. Normally I have created other custom field types that required the
creation of the additional control classes for rendering the editor
specifically. So I don't usually just inherit from the base class, I end up
writing all the supporting classes too. Does your inherited class specifically
override the FieldRenderingControl property or are you depending on inheritance
to do the job for you?

Answer #4    Answered By: Glenda Roth     Answered On: May 24

I am depending on inheritance to do the job for me. Basically i do
not want to alter the default behavior (New, Edit, Display) of
MutiLineText field. But I want to customize  the display  of the field
in list  view.

Didn't find what you were looking for? Find more on Customize the display pattern of Multi line text field Or get search suggestion and latest updates.