spfieldcollection

Problem adding field to a custom list type in SharePoint

I have defined a custom list template type for SharePoint. I install it using VSeWSS 1.3 and everything seems to behave correctly. I have added a custom action which will add additional columns (SPFields) to the list. However, every time that code executes it throws and ArgumentException with a 'Value not in the expected range.' error m...

need to write code behind for attachment field from display page of custom list

I have created custom list and modified display form for dispaly attachemet image of list. I want to dispaly attachement from code behind then what code I do need to write. I want to show attachedment field as well image. I tried with AttachmentsField, SPField and SPFieldAttachments but I couldn't compile code successfully. I don't hav...

Problem with DisplayPattern in SharePoint 2010?

I am adding a new field to a list using the AddFieldAsXML method of SPFieldCollection. The method executes fine with no problem. And the column header shows up when I view the list; however the value never displays in the column. Here is what the field looks like after it has been added to the list. This xml is a snipped from the lis...

C# - Insert/Update multiple lookup values to an SPListItem

My SharePoint list has a column that allows multiple lookup values. My C# control (within a webpart) allows the user to make multiple selections from a list box. I split these values into an array - each array member being a selected value that needs to be updated in the same SPListItem column. I know that the selections are being p...