-->

How to create new tab that has style as Descriptio

2019-07-23 18:29发布

问题:

I want to create new tab (Software Solution) and add new field (Solution) that is the same as Description tab to allow users put some description.

This is what I have done.

回答1:

You need to use the PXRichTextEdit control to achieve that. The customization design will not allow you to pick this control type, so you will likely need to manually edit the ASPX file directly to add a PXRichTextEdit. From the layout editor, select Actions->Edit Aspx, and manually modify the ASPX to add your new control. You can then click the Generate Customization Script button to update the customization project.

This is how the Description tab looks like in the ASPX:

            <px:PXTabItem Text="Description" LoadOnDemand="true" >
                <Template>
                    <px:PXRichTextEdit ID="edBody" runat="server" DataField="Body" Style="border-width: 0px; border-top-width: 1px; width: 100%;"
                        AllowAttached="true" AllowSearch="true" AllowLoadTemplate="false" AllowSourceMode="true">
                        <AutoSize Enabled="True" MinHeight="216" />
                        <LoadTemplate TypeName="PX.SM.SMNotificationMaint" DataMember="Notifications" ViewName="NotificationTemplate" ValueField="notificationID" TextField="Name" DataSourceID="ds" Size="M"/>
                    </px:PXRichTextEdit>
                </Template>
            </px:PXTabItem>