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

  • SEARCH
  • Home
  • 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 8509165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:21:40+00:00 2026-06-11T03:21:40+00:00

In a Sharpoint 2010 project, I have a custom content type, which inherits the

  • 0

In a Sharpoint 2010 project, I have a custom content type, which inherits the standard Task content type, and a custom list template, with items of this content type (everything is done in XML and code, not ‘clicked-through’).

I would like to add a Gantt chart to my list. I can do it using the web interface but I would like to have it in code. So I have done it manually, opened Sharepoint Manager, previewed the view schema and, with minor but necessary modifications, copied it to my list schema. So I ended up with a view which looks more less like this:

  <View WebPartZoneID="Main" Type="GANTT" DisplayName="Gantt Chart" Url="gantt.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/images/issues.png" SetupPath="pages\viewpage.aspx">
    <Query>
      <OrderBy>
        <FieldRef Name="ID" />
      </OrderBy>
    </Query>
    <ViewFields>
      <FieldRef Name="Attachments" />
      <FieldRef Name="ID" />
      <FieldRef Name="DocIcon" />
      <FieldRef Name="LinkTitle" />
      <FieldRef Name="AssignedTo" />
      <FieldRef Name="Status" />
      <FieldRef Name="Priority" />
      <FieldRef Name="StartDate" />
      <FieldRef Name="DueDate" />
      <FieldRef Name="MyCustomField" />
      <!-- other FieldRefs for my custom fields -->
    </ViewFields>
    <ViewData>
      <FieldRef Name="StartDate" Type="GanttStartDate" />
      <FieldRef Name="DueDate" Type="GanttEndDate" />
      <FieldRef Name="Title" Type="GanttTitle" />
      <FieldRef Name="PercentComplete" Type="GanttPercentComplete" />
      <FieldRef Name="Predecessors" Type="GanttPredecessors" />
    </ViewData>
    <RowLimit Paged="TRUE">30</RowLimit>
    <Aggregations Value="Off" />
  </View>

But this doesn’t work. The view is visible on the list, but when I open it, a blank page appears. Because of some reason, when I preview my custom view in Sharepoint Manager the <ViewData> tag is not there. I may add this tag manually in Sharepoint Manager and then the view magically starts to work. However, the tag, because of some reason, is not deployed with the rest of the view.

Any suggestions as to how to make the tag deploy?

  • 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-11T03:21:41+00:00Added an answer on June 11, 2026 at 3:21 am

    I am not sure what is wrong in your declaration but i was able to add working defininition to schema. Here it is my definition:

    <View BaseViewID="9" Type="GANTT" WebPartZoneID="Main" DisplayName="Gantt view" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/images/issues.png" Url="Gantt.aspx" ReqAuth="TRUE">
            <Toolbar Type="Standard" />
            <XslLink Default="TRUE">main.xsl</XslLink>
            <RowLimit Paged="TRUE">30</RowLimit>
            <ViewFields>
              <FieldRef Name="LinkTitle" />
              <FieldRef Name="AssignedTo" />
              <FieldRef Name="TaskGroup" />
              <FieldRef Name="Status" />
              <FieldRef Name="Priority" />
              <FieldRef Name="DueDate" />
              <FieldRef Name="PercentComplete" />
              <FieldRef Name="Predecessors" />
              <FieldRef Name="Comments" />
            </ViewFields>
            <ViewData>
              <FieldRef Name="StartDate" Type="GanttStartDate"/>
              <FieldRef Name="DueDate" Type="GanttEndDate"/>
              <FieldRef Name="Title" Type="GanttTitle"/>
              <FieldRef Name="PercentComplete" Type="GanttPercentComplete"/>
              <FieldRef Name="Predecessors" Type="GanttPredecessors"/>
            </ViewData>
            <ParameterBindings>
              <ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
              <ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" />
            </ParameterBindings>
            <Query>
              <OrderBy>
                <FieldRef Name="Title"></FieldRef>
              </OrderBy>
            </Query>
          </View>
    

    Just note that BaseViewID should be unique in scope and I dont use ContentTypeID.
    Also Computed and calculated fields doenot working here so you should create new simple text field and populate them in event recievers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a custom list in SharePoint 2010 programmatically. It works fine on
I have a custom Sharepoint 2010 Web Template and I would like to set
I have a custom Sharepoint 2010 web part that runs the user through a
I have a quick question....building a VS 2010 SharePoint project and I am referencing
I have the following setup: Sharepoint 2010 with SQL Server and Office 2010. This
I have two event recievers setup on a list in 2010. The first is
I've made a VS 2010 project and created 1 wspbuilder solution. I have 3
I'm working on a SharePoint 2010 project. We have a usercontrol to include all
My company has a project for which I proposed using SharePoint Enterprise 2010. We
I am working on a SharePoint 2010 Server and i have following items in

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.