문제

How to add a default value to a list field when coding in sharepoint?

Here are all the possible fields: http://msdn.microsoft.com/en-us/library/ms437580.aspx

DefaultValue is not in this list.

This is my code:

<Field Name="AantalOneens" ID="{ea4ca32a-3cc3-4a39-ac35-794a7bbadee8}" DisplayName="Aantal oneens" Type="Number" Required="TRUE" DefaultValue="0" />

The default value property does not work, since it doesn't exists.

Any ideas?

도움이 되었습니까?

해결책

To set the default value to a field, you have to use the default element.You can find an example in the below link,
http://msdn.microsoft.com/en-us/library/ms415119.aspx

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top