Blank option in drop down disappears from custom Sharepoint list

sharepointsharepoint-2007

I have a custom list template that is deployed as a .wsp. The list has almost 30 columns, including several DropDownLists of column type "Choice". None of the columns are required and the customer wants a blank option as the default selection for each. Unfortunately once the list item has been saved, any columns that have had values selected can no longer be un-selected.

To get around this we added a blank <CHOICE> </CHOICE> element in the schema.xml and event.xml files.

Unfortunately, one of the columns completely ignores the blank choice – acts just the same as I described above (SP default behavior). I have already checked the obvious (to me) things – making sure guids match up, the blank choice exists in both files, etc.

Any other ideas on what I can look into to fix?

Best Answer

I think I solved this long time issue after a lot of frustration and trial and error. Everyone seems to think that this is not possible by design, but it is in fact quite simple.

Spaces in column choices seem to be wiped by SharePoint, but I found a blank character in the ASCII table that does not get wiped by the SharePoint engines.

This is ASCII Character 0x81 or 0129.

Non-Blank Space (0160) seems to be swiped too

To create a blank character hold down the 'Alt' key and type '0129' on the NUMERIC KEYPAD.

Alternate option: I used PSPAD editor to create a single character 129 and copied and pasted that in one of my choices type columns and presto: a blank selection appeared in the column selector. I suspect it will work for your solution too.

Related Topic