Developer Forum »
Set checkbox-property to default checked
62 posts

Is it possible to make the checkbox-property "checked by default" in the ontology-module? 

6 posts

I think "default value" is missing from the onthology, but it can easily be done from inside the partial class.

181 posts

Einar is correct, the default value is not available in the ontology module, so at the moment you need to set it in the partial class. 

The whole ontology module will be replaced by a Visual Studio plugin before the summer. The plugin will make it possible to set the default value without writing code.

120 posts

You can add it manually to the definition file aswell:

example:

        <Property Guid="01c13cf9-0443-47b2-944d-be4b52cd0b1e" CodeName="HideLeftColumn" PropertyClassGuid="68bb6e0a-f394-4311-a6d4-cca8c9534404">
          <DataValues>
            <DataValue Guid="53c3bf6b-a4b4-4f1a-bd32-b5a23ee76fc7" FieldName="hide_left_column" DataValueType="Boolean">
              <Default>false</Default>
            </DataValue>
          </DataValues>
          <Globalization>
            <Lang LCID="1044" Name="Skjul venstre kolonne" />
          </Globalization>
          <LoadByDefault>true</LoadByDefault>
          <Settings />
        </Property>
62 posts

Thank you, all! Looking forward to try the new Visual Studio plugin.

1