How to add a memo / formatted text field ala Cases

心已入冬 提交于 2020-05-14 11:04:32

问题


I'd like to add a tab to a screen which contains a memo / formatted text area the way the Cases screen does, e.g.:

Adding a tab is straightforward, no help necessary there, but I don't remember seeing anything about how to add this type of text area in the training courses. If there's an example I'd appreciate a point in the right direction.


回答1:


You can add the RichTextEditor manually to your aspx file.

 <px:PXTabItem Text="Test">
    <Template>
      <px:PXRichTextEdit runat="server" AllowLoadTemplate="false" 
         AllowAttached="true" AllowSearch="true" AllowMacros="true" 
         AllowSourceMode="true" DataField="YOURFIELD" ID="edDescription" 
         Style='width:100%;'>
        <AutoSize Enabled="True" />
      </px:PXRichTextEdit>
    </Template>
</px:PXTabItem>

Make sure you Tab has the correct Datamember where your field used on the RichTextEditor is located.

 <px:PXTab DataMember="Document" ID="tab" runat="server" Height="540px" Style="z-index: 100;" Width="100%">

Also you could mark your Field used on the RichTextEditor as PXDBText.

    #region YourField
    public abstract class yourField : IBqlField { }

    protected String _yourField;
    [PXDBText(IsUnicode = true)]
    [PXUIField(DisplayName = "YOURFIELD")]
    public virtual String YourField
    {
        get
        {
            return this._yourField;
        }
        set
        {
            this._yourField = value;
        }
    }
    #endregion


来源:https://stackoverflow.com/questions/46471393/how-to-add-a-memo-formatted-text-field-ala-cases

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