Custom labels for DevExtreme Angular2 Form

I am using the latest version of DevExtreme for Angular 2 as I'm writing this which is version 16.2. I have a DevExtreme form which is getting data user from its component. As you can see, there isn't much to it.

<dx-form id="form" [(formData)]="user">
    <dxi-item dataField="fName"></dxi-item>
    <dxi-item dataField="lName"></dxi-item>
</dx-form>

I can't figure out, however, how to change a label from the default which is gathered from the dataField . I've looked around in the documentation and I can't seem to find the answer. I feel like I should be able to write:

<dxi-item dataField="lName" customLabel="Last Name"></dxi-item>

Seems like a feature that should exist and that should be easy to find in documentation.


The label.text option is helpful in your case. The code should be like below:

<dxi-item dataField="lName" [label]="{text: 'Custom Label'}"></dxi-item>
链接地址: http://www.djcxy.com/p/31044.html

上一篇: 如果列最初是隐藏的,则标题过滤器不起作用

下一篇: DevExtreme Angular2表单的自定义标签