Does it mean that currently all three fields are editable and you want to set A and B to be read-only?
If so, first think about whether it's something specific to the form. If A and B shouldn't ever be editable by users, you should handle it on the table itself (then it will be used by all forms). Table fields has two relevant properties: AllowEdit and AllowEditOnCreate.
If it indeed is specific to the single form, set properties of datasource fields. Note that it can also be done from code, if it needs to be disabled only in some specific cases.