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

I have created 10 views using feature activation for task lib. Now i have to replace one particular view field from the view. But i am not able to modify that existing view create code. Ex: Field1 is 5th item in the view so i need to replace the Field1 to Field2 on the same position with all the views. Is that possible?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

When you add a new field i.e. Field2 it will automatically get added at the last of the view field collection. In order to place it at a proper place you will first need to create collection of fields based on their order, then clear all the fields in the view collection and finally adding the fields from your ordered collection to the view. This may be helpful: http://blog.sharedove.com/adisjugo/index.php/2011/01/30/change-the-fields-order-in-the-sharepoint-view/

share|improve this answer
add comment

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.