Nativescript-ui-feedback: Is there colSpan or a similar attribute in DataFormGridLayout

Created on 31 Jan 2018  路  6Comments  路  Source: ProgressNS/nativescript-ui-feedback

i write a form containing full-width columns and half-width columns. But all become half-width columns. Is there any way to support colSpan or similar configuration?

dataform feature

Most helpful comment

Hi @tsonevn
Thanks for your reply!
I want to make a simple form like this:


row 0: name (half-width), age (half-width)
row 1: address (full-width)


Following is my codes and implementation:
<RadDataForm tkExampleTitle tkToggleNavButton [source]="person" row="1"> <TKPropertyGroup tkDataFormGroups collapsible="false" name="Main Info" titleHidden="false" hidden="false"> <TKDataFormGridLayout tkPropertyGroupLayout></TKDataFormGridLayout> <TKEntityProperty tkPropertyGroupProperties name="name" index="0" columnIndex="0"> <TKPropertyEditor tkEntityPropertyEditor type="Text"></TKPropertyEditor> </TKEntityProperty> <TKEntityProperty tkPropertyGroupProperties name="age" index="0" columnIndex="1"> <TKPropertyEditor tkEntityPropertyEditor type="Number"></TKPropertyEditor> </TKEntityProperty> </TKPropertyGroup> <TKPropertyGroup tkDataFormGroups collapsible="false" name="Main Info Extend" titleHidden="true" hidden="false"> <TKDataFormGridLayout tkPropertyGroupLayout></TKDataFormGridLayout> <TKEntityProperty tkPropertyGroupProperties name="address" index="0" columnIndex="0"> <TKPropertyEditor tkEntityPropertyEditor type="Text"></TKPropertyEditor> </TKEntityProperty> </TKPropertyGroup> </RadDataForm>
These codes are ugly, but i don't know any other implementations for the expected form. If 'tkPropertyGroupProperties' has colSpan or similar functionality, i can take 'name' 'age' and 'address' into the same group.

All 6 comments

Hi @wanpeng2008,
At this time similar functionality for setting colSpan does not exist. Regarding that, I log this one a new feature. It would help if you provide more detailed info, what do you expect from similar functionality as a final result.

Hi @tsonevn
Thanks for your reply!
I want to make a simple form like this:


row 0: name (half-width), age (half-width)
row 1: address (full-width)


Following is my codes and implementation:
<RadDataForm tkExampleTitle tkToggleNavButton [source]="person" row="1"> <TKPropertyGroup tkDataFormGroups collapsible="false" name="Main Info" titleHidden="false" hidden="false"> <TKDataFormGridLayout tkPropertyGroupLayout></TKDataFormGridLayout> <TKEntityProperty tkPropertyGroupProperties name="name" index="0" columnIndex="0"> <TKPropertyEditor tkEntityPropertyEditor type="Text"></TKPropertyEditor> </TKEntityProperty> <TKEntityProperty tkPropertyGroupProperties name="age" index="0" columnIndex="1"> <TKPropertyEditor tkEntityPropertyEditor type="Number"></TKPropertyEditor> </TKEntityProperty> </TKPropertyGroup> <TKPropertyGroup tkDataFormGroups collapsible="false" name="Main Info Extend" titleHidden="true" hidden="false"> <TKDataFormGridLayout tkPropertyGroupLayout></TKDataFormGridLayout> <TKEntityProperty tkPropertyGroupProperties name="address" index="0" columnIndex="0"> <TKPropertyEditor tkEntityPropertyEditor type="Text"></TKPropertyEditor> </TKEntityProperty> </TKPropertyGroup> </RadDataForm>
These codes are ugly, but i don't know any other implementations for the expected form. If 'tkPropertyGroupProperties' has colSpan or similar functionality, i can take 'name' 'age' and 'address' into the same group.

+1

It would be good to be able to customize the width of each TKPropertyEditor element. For e.g. I don't need the DatePicker element to take up the whole form width, since the value is going to be at most "xxx, yy.zz" (for e.g. Sat, 07.07). It would be fantastic if a width property setter could be exposed.

FYI I tried to set this TextView's width in the native element like so

var textAndroid = data.editor.getEditorView();
textAndroid.setWidth(40);

but it doesn't seem to work, I guess because the LAYOUTPARAMS forces full width?

Thanks

Any update on this? Surprising that TKDataFormGridLayout does not accept the same parameters as the GridLayout. Seems like an obvious requirement.

@tsonevn any update for this feature?

Was this page helpful?
0 / 5 - 0 ratings