Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9102173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T01:18:58+00:00 2026-06-17T01:18:58+00:00

I am new to sharepoint. I am trying to create a list using C#.

  • 0

I am new to sharepoint. I am trying to create a list using C#.

SPList list = web.Lists["MyList"];
list.OnQuickLaunch = true;
list.Fields.Add("Col1", SPFieldType.Text, true);
list.Update();

The new field created “Col1”, is not displaying in the list. However, I am able to view this field in the list setting. To make it visible, I have make display enable in the View (default view i.e., All Items).

My question is can I achieve it programmatically? I have searched in Stackoverflow and google but could not find the satisfactory answer.

TIA,

Idds.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T01:18:59+00:00Added an answer on June 17, 2026 at 1:18 am

    You have to get a reference to the SPView, add the field to the ViewFileds collection and update.

    //get a reference to the target view
    SPView view = list.Views["Existing_View_Name"];
    
    // add field to the view
    view.ViewFields.Add("Col1");
    
    // update view for the new field
    view.Update();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to generate a new SharePoint list item directly using SQL server. What's
I am trying to create Lists in Sharepoint site from my ASP.NET code using
I'm new to Sharepoint. I'm trying to create a simple webpart using Visual Studio
I'm trying to create a C# program using a Sharepoint Web Service reference that
I am trying to create a list template in SharePoint Feature using CAML. I
I have a SharePoint List to which I'm adding new ListItems using the Client
I am trying to insert new ListItems in a Sharepoint 2010 List already created.
I'm new to SharePoint development and I am trying to create a simple issue
I'm creating a SharePoint application, and am trying some new things to create what
I am trying to create a sort of bootstrap web service using a classic

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.