How to include a relation of a relation in an AppMaker table field?

懵懂的女人 提交于 2019-12-02 09:33:28

You can manually add header and 'cell'(one more label in list row).

Binding for the label in the header:

@models.Partner.fields.Name.displayName

Binding for the label in the list row:

@datasource.item.Client.Partner.Name

And don't forget to add both Client and Client.Partner relations to Prefetch, it should make your page load/render faster.

Useful tip:

You can copy/paste existing table labels to duplicate all original margins/paddings/styles and make them look/behave in the same way as all other labels within the table. In this case you'll need just to adjust your bindings and maybe rename some things.

Note:

Most likely you'll not be able to sort your table by relation of relation, but feel free to try(checkout onClick event handlers of labels in the table header).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!