1,633 questions

3,178 answers


478 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:FormField FieldID="YEAR" DataType="String" Caption="Year" ReadOnly="true" />
        <common:FormField FieldID="EXPECTEDASKAMOUNT" DataType="Money" Caption="Expected amount" ReadOnly="true" />

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)   3

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,850 points)   8 25 43
selected Jun 14 by user16215