1

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);
  • what Kind of view are you trying to build? – Gwny Aug 6 '14 at 11:46
  • Like in the first picture, with the site columns "task nr", "completed" (checkbox), title... – Plexus81 Aug 6 '14 at 11:54
  • No I mean are you trying a Standart-View or Data View etc.? – Gwny Aug 6 '14 at 12:11
  • I'm using standard-view – Plexus81 Aug 6 '14 at 12:22
1

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.

  • 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 '14 at 11:51
1

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?

0

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);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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