Ejemplo n.º 1
0
        private static DXMenuItem NewDXMenuItem(object sender, PopupMenuShowingEventArgs e, IModelGridViewRuleCustomSummaryCalculate modelGridViewRule)
        {
            bool       check    = e.HitInfo.Column.SummaryItem.SummaryType == SummaryItemType.Custom && Equals(modelGridViewRule, e.HitInfo.Column.SummaryItem.Tag);
            DXMenuItem menuItem = new DXMenuCheckItem(modelGridViewRule.Caption, check, null, (o, args) => {
                var item            = ((DXMenuItem)sender);
                var col             = ((GridColumn)item.Tag);
                col.SummaryItem.Tag = modelGridViewRule;
                col.SummaryItem.SetSummary(SummaryItemType.Custom, string.Empty);
            });

            menuItem.Tag = e.HitInfo.Column;
            return(menuItem);
        }
Ejemplo n.º 2
0
 public static IEnumerable <Type> Get_Controllers(IModelGridViewRuleCustomSummaryCalculate calculate)
 {
     return(XafTypesInfo.Instance.FindTypeInfo(typeof(ICustomSummaryCalculateEvent)).Implementors.Where(info => !info.IsInterface).Select(info => info.Type));
 }