I have very similar situation to

re-ordering navigation for quick launch section

I have about 6 links that is under the quick lunch. I only 3 headings. These 6 links will go under the "Project Management" heading.

The last line node.MoveToLast does not resolve because it wants the whole navcollection. How can I handle this?

1 Answer 1


Yes, MoveToLast() requires an SPNodeCollection be passed in as the parent. Fortunately, each node in the QuickLaunch has a Children property which is the node collection that you need.

Please refer to re-ordering navigation for quick launch section for the code sample you can use.

  • @Laurie: You ROCK GIRL...... Thanks. I will let you how it went. Thanks a lot..... Robi
    – Robert G
    Jun 2, 2011 at 3:39
  • @Hey there: the 6 links under the main navigation did not move to "Project" header area.
    – Robert G
    Jun 2, 2011 at 3:56
  • I recommend setting a breakpoint and stepping into the code to see where it's failing. It could be a spelling error on the heading name or something.
    – Laurie
    Jun 2, 2011 at 4:08
  • @Laurie: It goes through all the lines and does not have any hick-ups. I have 3 headings and they are all populated child. However, I have 6 links directly under the main tree (not under any header) and these needs to be moved to project header.
    – Robert G
    Jun 2, 2011 at 4:18
  • Could it be that these 6 aspx pages gets added right before calling this function? I tried adding web.update() before running the updateNavigation routine but no help.
    – Robert G
    Jun 2, 2011 at 4:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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