Пример #1
0
        public GridViewCustomMenu(GridEditControl gec, GridView view, PopupMenyType menuType) : base(view)
        {
            _mt  = menuType;
            _gec = gec;
            //handlers
            eh_addItemClick = (s, e) => {
                _gec.addRow();
            };

            eh_remItemClick = (s, e) =>
            {
                _gec.remRow();
            };

            //items
            addItem        = new DXMenuItem("Add");
            addItem.Click += eh_addItemClick;

            if (menuType == PopupMenyType.addRem)
            {
                remItem        = new DXMenuItem("Del");
                remItem.Click += eh_remItemClick;
            }
        }
Пример #2
0
		public GridViewCustomMenu(GridEditControl gec, GridView view, PopupMenyType menuType) : base(view) {

			_mt = menuType;
			_gec = gec;
			//handlers
			eh_addItemClick = (s, e) => {
				_gec.addRow();
			};

			eh_remItemClick = (s, e) =>
			{
				_gec.remRow();
			};

			//items
			addItem = new DXMenuItem("Add");
			addItem.Click += eh_addItemClick;

			if(menuType == PopupMenyType.addRem) {
				remItem = new DXMenuItem("Del");
				remItem.Click += eh_remItemClick;
			}
		}