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?
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/