1,604 questions

3,150 answers

1,678 comments

469 users

ViewDataForm -- create a read-only collection field without a UIModel

+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 Jun 14 by user16215 (110 points)   2

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 Jun 14 by chriswhisenhunt (3,603 points)   8 23 41
selected Jun 14 by user16215
...