Question: How to change "Title" column display name in default view of a list when creating list by list definition using Visual Studio in SharePoint?
Answer: In Schema.xml file of your list definition project, search for "Fields" tag (i.e. <Fields>) and just before the closing tag of this "Fields" tag (i.e. </Fields> ), put below line of code (also see attached image):
<Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Type="Text" Name="LinkTitle" DisplayName="First Name" />
In the above line of code:
ID = ID of your "Title" field
Type = Same as of your "Title" field i.e "Text"
Name = LinkTitle (it will refer to the "Title" text in default view)
DisplayName = The name you want to display in your default view instead of "Title"
Hope this helps!
Answer: In Schema.xml file of your list definition project, search for "Fields" tag (i.e. <Fields>
<Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Type="Text" Name="LinkTitle" DisplayName="First Name" />
In the above line of code:
ID = ID of your "Title" field
Type = Same as of your "Title" field i.e "Text"
Name = LinkTitle (it will refer to the "Title" text in default view)
DisplayName = The name you want to display in your default view instead of "Title"
Hope this helps!
No comments:
Post a Comment