1.7k questions

3.2k answers

1.7k comments

399 users

Categories

1.7k questions

3.2k answers

1.7k comments

399 users

+1 vote

Is there a way to create a read-only collection field in a ViewDataForm extension, without using a UIModel? I have a ViewDataForm spec with this collection:

  <common:FormField FieldID="EXPECTEDAMOUNTS" DataType="XML" Caption="Expected amounts" ReadOnly="true">
    <common:Collection>
      <common:Fields>
        <common:FormField FieldID="YEAR" DataType="String" Caption="Year" ReadOnly="true" />
        <common:FormField FieldID="EXPECTEDASKAMOUNT" DataType="Money" Caption="Expected amount" ReadOnly="true" />
      </common:Fields>
    </common:Collection>
  </common:FormField>

But the resulting collection is still editable -- field values can be edited and rows can be added or deleted. I found some other custom code (built by Professional Services) that creates a read-only collection, but that uses a UIModel, setting DBReadOnly = True. I'd rather avoid having to create a UIModel, as I really don't need it otherwise.

asked by user16215 (110 points)

1 Answer

+1 vote
 
Best answer

There is not. In the time it took to create this post you could have created a UIModel. :P

There are multiple properties to set, besides the read only stuff you'll want to look at ALLOWADDNEW and others similar.

answered by chriswhisenhunt (3.9k points)
selected by user16215
...