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

Groups doesnt show in UI

3 Answers 51 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.
Johnny
Top achievements
Rank 1
Johnny asked on 08 Feb 2017, 02:05 PM

So here is my next issue:

When I add groups, the groups are not showing in the UI, they appear in the UI as though I havent set groups.

Any ideas why this might happen?

<RadDataForm [source]="baseCustomer" commitMode="OnLostFocus" >

<TKPropertyGroup tkDataFormGroups collapsible="true" name="Customer Contact Details" hidden="false">

<TKEntityProperty tkDataFormProperty name="customerName" displayName="Name" index="0" >
<TKPropertyEditor tkEntityPropertyEditor type="Text"></TKPropertyEditor>
</TKEntityProperty>

<TKEntityProperty tkDataFormProperty name="jobTitle" displayName="Job Title" index="1" >
<TKPropertyEditor tkEntityPropertyEditor type="Text"></TKPropertyEditor>
</TKEntityProperty>

<TKEntityProperty tkDataFormProperty name="telephoneNumber" displayName="Telephone Number" index="2" >
<TKPropertyEditor tkEntityPropertyEditor type="Text"></TKPropertyEditor>
</TKEntityProperty>

<TKEntityProperty tkDataFormProperty name="emailAddress" displayName="Email" index="3" >
<TKPropertyEditor tkEntityPropertyEditor type="Text"></TKPropertyEditor>
</TKEntityProperty>

</TKPropertyGroup>

<TKPropertyGroup tkDataFormGroups collapsible="false" name="Business Details" hidden="false">

<TKEntityProperty tkDataFormProperty name="companyName" displayName="Business Name" index="3" >
<TKPropertyEditor tkEntityPropertyEditor type="Text"></TKPropertyEditor>
</TKEntityProperty>

</TKPropertyGroup>

</RadDataForm>

 

3 Answers, 1 is accepted

Sort by
0
Johnny
Top achievements
Rank 1
answered on 08 Feb 2017, 02:06 PM
Sorry this is just in Android, havent tested iOS yet!
0
Accepted
Nick Iliev
Telerik team
answered on 09 Feb 2017, 07:02 AM
Hi Johnny Zen,

The reason for your PropertyEditos not to show in groups is because in the code snippet provided for each tkEntityProperty is used the tkDataFormProperty directive where it should be tkPropertyGroupProperties.

For example here is your code using tkPropertyGroupProperties directive
<RadDataForm [source]="baseCustomer" commitMode="OnLostFocus">
    <TKPropertyGroup tkDataFormGroups collapsible="true" name="Customer Contact Details" hidden="false">
        <TKEntityProperty tkPropertyGroupProperties name="customerName" displayName="Name" index="0">
            <TKPropertyEditor tkEntityPropertyEditor type="Text"></TKPropertyEditor>
        </TKEntityProperty>
        <TKEntityProperty tkPropertyGroupProperties name="jobTitle" displayName="Job Title" index="1">
            <TKPropertyEditor tkEntityPropertyEditor type="Text"></TKPropertyEditor>
        </TKEntityProperty>
        <TKEntityProperty tkPropertyGroupProperties name="telephoneNumber" displayName="Telephone Number" index="2">
            <TKPropertyEditor tkEntityPropertyEditor type="Text"></TKPropertyEditor>
        </TKEntityProperty>
        <TKEntityProperty tkPropertyGroupProperties name="emailAddress" displayName="Email" index="3">
            <TKPropertyEditor tkEntityPropertyEditor type="Text"></TKPropertyEditor>
        </TKEntityProperty>
    </TKPropertyGroup>
 
    <TKPropertyGroup tkDataFormGroups collapsible="false" name="Business Details" hidden="false">
        <TKEntityProperty tkPropertyGroupProperties name="companyName" displayName="Business Name" index="3">
            <TKPropertyEditor tkEntityPropertyEditor type="Text"></TKPropertyEditor>
        </TKEntityProperty>
    </TKPropertyGroup>
</RadDataForm>

Keep in mind that any not grouped property will show first and then the groups will show as well. (so basically you might need to group all your source properties if you want to avoid this behaviour).

Regards,
Nikolay Iliev
Telerik by Progress
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.
0
Johnny
Top achievements
Rank 1
answered on 09 Feb 2017, 03:19 PM

Thanks Nikolay. Getting caught out by my lack of understanding.

Thanks for explaining :)

Tags
DataForm
Asked by
Johnny
Top achievements
Rank 1
Answers by
Johnny
Top achievements
Rank 1
Nick Iliev
Telerik team
Share this question
or