I need a masking settings that can be dynamic. and I found SetInputMask In development guide, but I do not find a way to use it, whether here there who have been using these SetInputMask? how the example to use it?
Thank
protected virtual void _(Events.RowSelected<FilterDAC> e)
{
if (e.Row != null)
{
FilterDAC row = e.Row as FilterDAC;
PXDBStringAttribute.SetInputMask<FilterDAC.stringField>(e.Cache, e.Row, ">CCCC");
/*PXStringAttribute for non DB backed fields*/
}
}
If you are trying to change masking on a text box the control must be declared as a PXMaskEdit as shown below :
<px:PXMaskEdit runat="server" DataField="StringField" ID="edStringField" CommitChanges="True" AlreadyLocalized="False"></px:PXMaskEdit>
May be this will be helpful. Thanks
public class APInvoiceEntry_Extension:PXGraphExtension<APInvoiceEntry>
{
public override void Initialize()
{
PXDBStringAttribute.SetInputMask<APInvoice.docDesc>(Base.Document.Cache, ">CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC");
}
}