This is a migrated thread and some comments may be shown as answers.

RadDataForm JSON Metadata

1 Answer 91 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Douglas
Top achievements
Rank 1
Douglas asked on 14 Nov 2017, 08:34 AM

I have two questions:

1) on iOS, it looks like JSON metadata specifying "hidden": true is being ignored.

2) Is there anyway to specify styling in the metadata?  I want to specify that labelPosition=Top on iOS.

 

Here is part of my JSON metadata for #1.  Id is showing in the form.

public drillMetadata: any = {
"isReadOnly": false,
"commitMode": "Immediate",
"validationMode": "Immediate",
"propertyAnnotations":
[
{
"name": "id",
"displayName": "ID",
"hidden": true,
},
{
"name": "name",
"displayName": "Name",
"index": 0,
"required": true,
"validators": [{
"name": "MinimumLength",
"params": {
"length": 3
}
}]
},......

1 Answer, 1 is accepted

Sort by
0
Nick Iliev
Telerik team
answered on 14 Nov 2017, 09:30 AM
Hello Douglas,

When setting the properties via JSON metadata, the key to hiding the property is called ignore.
Change the JSON to use ignore instead of hidden, and it will work as expected on both iOS and Android.
More about all supported properties can be found in this documentation section.

For example, based on the provided JSON
{
    "name": "id",
    "displayName": "ID",
    "ignore": true,
}


Regarding your second question
There is no option to set the styling via the JSON metadata. The available options are via code behind or via inline styles.
The feature of styling controls via metadata is logged here, and I have also upvoted this feature concerning this ticket number.

Regards,
Nikolay Iliev
Progress Telerik
Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
Tags
DataForm
Asked by
Douglas
Top achievements
Rank 1
Answers by
Nick Iliev
Telerik team
Share this question
or