用于管理Kentico中自定义模块中类之间的一对多关系的UI

用于管理Kentico中自定义模块中类之间的一对多关系的UI,kentico,Kentico,我在Kentico V12中创建了一个Clinic模块,包含两个类:Doctor和Appointment。医生和预约之间存在一对多的关系。如何在预约表格中显示医生的姓名 <?xml version="1.0" encoding="utf-8" ?> <grid> <actions> <action name="edit" caption="$General.Ed

我在Kentico V12中创建了一个Clinic模块,包含两个类:Doctor和Appointment。医生和预约之间存在一对多的关系。如何在预约表格中显示医生的姓名

<?xml version="1.0" encoding="utf-8" ?>
<grid>
    <actions>
        <action name="edit" caption="$General.Edit$" fonticonclass="icon-edit" fonticonstyle="allow" />
        <action name="#delete" caption="$General.Delete$" fonticonclass="icon-bin" fonticonstyle="critical" confirmation="$General.ConfirmDelete$" />
    </actions>
    <columns>
        <column source="AppointmentPatientFirstName" caption="First name" wrap="false" localize="true">
            <filter type="text" size="200" />
        </column>
        <column source="AppointmentPatientLastName" caption="Last name" wrap="false" localize="true">
            <filter type="text" size="200" />
        </column>
        <column source="AppointmentPatientEmail" caption="Email" wrap="false" localize="true">
            <filter type="text" size="200" />
        </column>
        <column source="AppointmentPatientPhoneNumber" caption="Phone Number" wrap="false" localize="true">
            <filter type="text" size="15" />
        </column>
        <column source="Date" caption="Date" wrap="false" localize="true">
            <filter type="text" size="200" />
        </column>
        <column source="AppointmentPatientBirthDate" caption="BirthDate" wrap="false" localize="true">
            <filter type="text" size="200" />
        </column>
        <column source="AppointmentDoctorID" caption="Doctor ID" wrap="false" localize="true">
            <filter type="text" size="200" />
        </column>
    </columns>
    <options>
        <key name="DisplayFilter" value="true" />
    </options>
</grid>


使用此列
任命doctorid
修改XML以使用如下转换:

<column source="AppointmentDoctorID" caption="Doctor" externalsourcename="#transform: yournamespace.doctor: {%FirstName%} {%LastName%}" wrap="false" localize="true"></column>

在中查看有关unigrids的更多文档