SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to edit a column name in Sharepoint ?When O rename a column I can't get by the code to column name.

           if (properties.List.Title == "Wpisy")
           SPList lstOtherList = properties.Web.Lists["Szczegoly"];
           SPListItem item = lstOtherList.AddItem();

           item["Kontrakt"] = properties.AfterProperties["Kontrakt1"];
           item["Pracownik"] = properties.AfterProperties["Pracownik1"];
           item["Dzien"] = properties.AfterProperties["DzienStart"];


I must change a name for columns, and this is works, but i don't want to always build a new list from the begining.

share|improve this question
up vote 4 down vote accepted

Every column in SharePoint has 3 names:

  • InternalName (just called Name in <Field> and <FieldRef> elements)
  • StaticName
  • DisplayName (called Title in SPField)

InternalName can't be changed after field has been created
StaticName can be changed through code
DisplayName can be changed through code/UI

When accessing data/fields you should always use ID (often from SPBuiltInFieldId), InternalName (often using GetFieldByInternalName and then ID, but also directly as when accessing AfterProperties) or StaticName (often using TryGetFieldByStaticName and then ID)

share|improve this answer
Yes, but i don't want to use CALM. Maybe it is more easy use ? – Grzegorz Z Oct 15 '12 at 18:42
But how can I write theme ? In the Label, or console ? – Grzegorz Z Oct 16 '12 at 14:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.