ProgressNS / nativescript-ui-feedback

This repository is used for customer feedback regarding Telerik UI for NativeScript. The issues system here is used by customers who want to submit their feature requests or vote for existing ones.
Other
115 stars 21 forks source link

Cannot access EntityProperty properties when using metadata in RadDataForm #1306

Open bubbleheadinc opened 5 years ago

bubbleheadinc commented 5 years ago

Tell us about the problem

I cannot access properties of an EntityProperty when using metadata, but can when properties are set in XML.

Which platform(s) does your issue occur on?

Both

Please provide the following version numbers that your issue occurs with:

Please tell us how to recreate the issue in as much detail as possible.

  1. Start the application ..
  2. View console for log output. Band Name should have a value for the hidden and displayName props.

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

Here is a playground example where I am trying to get the required and displayName props from bandName when loaded, but they are coming back undefined. Thank you!

https://play.nativescript.org/?template=play-ng&id=4yhKEK&v=14

public onDataFormLoaded(args) {

        const _dataForm = <RadDataForm>args.object;
        this.dataForm = _dataForm;

        const bandNameEntityProperty = <EntityProperty>(
            this.dataForm.getPropertyByName('bandName')
        );

        console.log("Band Name Required? ", bandNameEntityProperty.required);
        console.log("Band Name Display Name: ", bandNameEntityProperty.displayName);

    }
Whip commented 4 years ago

Its a shame they barely touched to subject in the docs like its a simple thing to do. There is no complete example on how to change the editor type through EditorProperty class.