Since technology does not provide for the scenario where any individual column AGE read-only, standard method no.
However, there is a workaround:
- To add to detail calculated field.
- To determine the function of the calculation field so that it duplicated the column that you want to make read-only.
- E-view detail created a calculated field to remove the visibility of the original field.
After the generation of all objects will work.
Example
Suppose that we are given the following detail:
You must Field2
make a field read-only.
First we need to add a calculated field to the class:
Then, configure the view:
- Add a calculated field
- To remove visibility from the “old” field
- To customize the header of computable fields
To regenerate the objects. After regeneration it is necessary to modify getter
a calculated field so that it returns the value of the field that should be displayed read-only:
[ICSSoft.STORMNET.NotStored()]
[StrLen(255)]
[DataServiceExpression(typeof(ICSSoft.STORMNET.Business.SQLDataService), "Field2")]
public virtual string Field2ReadOnly
{
get
{
// *** Start programmer edit section *** (Side.Field2ReadOnly Get)
return Field2; // Here you specify the field.
// *** End programmer edit section *** (Side.Field2ReadOnly Get)
}
set
{
// *** Start programmer edit section *** (Side.Field2ReadOnly Set)
// *** End programmer edit section *** (Side.Field2ReadOnly Set)
}
}
Note:
DataServiceExpression
in this case is not necessary: when the AGE takes a real value and not StringedView
. However, it is recommended to install it.After this AGE will look like the following: