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

Depends on the view I need to get the column name from the list.With the help of viewID I am able to retrieve the selected column from the list but I have an issue while retrieving the column names,I have written the code like this.

SPView currentlistview = currentList.GetView(viewID);

  foreach (string viewField in currentlistview.ViewFields)
     string colname = currentList.Fields.GetField(viewField).Title;
     string colTitle = currentList.Fields.GetFieldByInternalName(viewField);

I have tried both the possibilities but I am getting the internal name of the field in the list.Could anyone provide a solution to get the display name of the field ?

share|improve this question
SPField.Title is the display name. Have you created strange names for the columns? – James Love Jun 7 '11 at 16:40
up vote 1 down vote accepted

you should check this post

Finding the internal name and display name for a list column

Hope it helps

share|improve this answer

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.