RichEditSettings.CustomizeMergeFields Property
Fires when the ‘Insert Merge Field’ command button is clicked, and enables you to customize a drop-down field list.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v24.2.dll
Declaration
Property Value
Type | Description |
---|---|
CustomizeMergeFieldsEventHandler | A CustomizeMergeFieldsEventHandler method to which custom processing is delegated. |
Remarks
Use the CustomizeMergeFields
event to customize the field list in the Insert Merge Field dialog.
private void richEditControl1_CustomizeMergeFields(object sender, DevExpress.XtraRichEdit.CustomizeMergeFieldsEventArgs e) {
List<MergeFieldName> mergeFieldNames = new List<MergeFieldName>(e.MergeFieldsNames);
mergeFieldNames.Remove(mergeFieldNames.Find(mfn => mfn.Name.ToLower() == "password"));
mergeFieldNames.ForEach(ChangeDisplayName);
mergeFieldNames.Sort(new ReverseComparer());
e.MergeFieldsNames = mergeFieldNames.ToArray();
}
See Also