I am working on Nativescript+angular application and using RadDataForm. Here is my example code.
<RadDataForm (propertyValidate)="onPropertyValidate($event)" row="0" tkExampleTitle tkToggleNavButton #myDataForm [source]="person"
[metadata]="personMetadata"></RadDataForm>
I am creating the form with "Json" file.
{
"isReadOnly": false,
"commitMode": "Immediate",
"validationMode": "Immediate",
"propertyAnnotations": [
{
"name": "insurance_name",
"displayName": "Insurance Name",
"index": 0,
"validators": [
{
"name": "NonEmpty",
"params": {
"errorMessage": "Insurance Name cannot be empty."
}
},
{ "name": "MinimumLength", "params": { "length": 4 } }
]
},
{
"name": "name",
"displayName": "Name",
"index": 1,
"validators": [
{
"name": "NonEmpty",
"params": {
"errorMessage": "Name cannot be empty."
}
}
]
}
}
]
I just want to know that how we can show/hide the particular field dynamically in typescript file. Suppose I have to show some field on the selection of drop down value. Hope you guys understand my concern. Please let me know if any one knows.
Here is a quick example which you could improve based on your needs.
HTML
TS