Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

What I'm trying to accomplish; checkbox that show if a task is "done / finished"

enter image description here

But when I try to edit the library view I only get "% Complete" and not "Completed". Is there some settings I'm missing? enter image description here

Do I have to create my own site column to get this functionality?

Solution

I found that I'm adding wrong list.

var list = web.Lists;
lists.Add(TasksListNameListName, "", SPListTemplateType.Tasks);

I should have used TasksWithTimelineAndHierarchy insted of Tasks! Then you get the checkbox out-of-the-box :)

var list = web.Lists;
lists.Add(TasksListNameListName, "", SPListTemplateType.TasksWithTimelineAndHierarchy);
share|improve this question
    
what Kind of view are you trying to build? –  Gwny Aug 6 at 11:46
    
Like in the first picture, with the site columns "task nr", "completed" (checkbox), title... –  Plexus81 Aug 6 at 11:54
    
No I mean are you trying a Standart-View or Data View etc.? –  Gwny Aug 6 at 12:11
    
I'm using standard-view –  Plexus81 Aug 6 at 12:22

3 Answers 3

Did you try to set the view to Basic style.. then reset them back to "Default" ?

It did the trick for our environment.

And also make sure you have applied the latest Microsoft SharePoint patches. Otherwise I think the problem is that check boxes don't show up on the view . Why don't you make the column drop down list with to option Completed or not and I am sure it will show up on view.

share|improve this answer
    
I'm provisioning all team sites based on a approver list with web templates. So then I have to make it problematically –  Plexus81 Aug 6 at 11:51

I don't know why this column is missing in your view editor, but you could just make a new column as a calculated field with formula =[% Complete]>=1 (like in the original one) and return type is yes/no.

Can you try that and look if this column would appear in your list view Editor?

share|improve this answer
up vote 0 down vote accepted

I found that I'm adding wrong list template.

var list = web.Lists;
lists.Add(TasksListNameListName, "", SPListTemplateType.Tasks);

I should have used TasksWithTimelineAndHierarchy insted of Tasks! Then you get the checkbox out-of-the-box :)

var list = web.Lists;
lists.Add(TasksListNameListName, "", SPListTemplateType.TasksWithTimelineAndHierarchy);
share|improve this answer

Your Answer

 
discard

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.