Maixant
Maixant

Reputation: 81

Modify editability of a field from field group by code

I have this piece of code:

controlDetails = this.form().design(1).addControl(FormControlType::Group, #quickCreateDetails);
    controlDetails.dataSource(fbds.id());
    controlDetails.dataGroup(#quickCreateDetails);
    controlDetails.frameType(10);
    controlDetails.autoDataGroup(true);
    controlDetails.hideIfEmpty(false);
    controlDetails.columns(2);

I want to modify the editability of one certain field on that dataGroup, but I don't know how to do it with code or in the AOT (DS). Seems like Im pretty much limited...

Upvotes: 1

Views: 407

Answers (1)

Matej
Matej

Reputation: 7627

You have next options:

  1. change Form Data Source filed editability

  2. change child control design property. addControl returns FormBuildGroupControl. Then you have to loop through controlNum(), find correct design control and cast it to one of FormBuildControl nested type with data bounding. There you have allowEdit method.

Upvotes: 2

Related Questions