Exemple #1
0
        private void gridViewAppointments_DoubleClick(object sender, EventArgs e)
        {
            GridView currentView = sender as GridView;

            if (!currentView.IsGroupRow(currentView.FocusedRowHandle))
            {
                AgendaViewMenuBuilder.Scheduler = OwnerScheduler;
                AgendaAppointment agendaAppointment = currentView.GetRow(currentView.FocusedRowHandle) as AgendaAppointment;
                AgendaViewMenuBuilder.CurrentAppointment = agendaAppointment.SourceAppointment;
                AgendaViewMenuBuilder.ViewControl        = this;
                AgendaViewMenuBuilder.OnOpenCurrentAppointment(null, null);
            }
        }
Exemple #2
0
 private void gridViewAppointments_PopupMenuShowing(object sender, DevExpress.XtraGrid.Views.Grid.PopupMenuShowingEventArgs e)
 {
     if (e.HitInfo.HitTest == DevExpress.XtraGrid.Views.Grid.ViewInfo.GridHitTest.RowCell)
     {
         GridView          currentView       = sender as GridView;
         AgendaAppointment agendaAppointment = currentView.GetRow(e.HitInfo.RowHandle) as AgendaAppointment;
         AgendaViewMenuBuilder.GenerateContextMenu(this, e.Menu, OwnerScheduler, agendaAppointment.SourceAppointment);
     }
     if (e.HitInfo.HitTest == DevExpress.XtraGrid.Views.Grid.ViewInfo.GridHitTest.EmptyRow)
     {
         if (e.Menu == null)
         {
             e.Menu = new DevExpress.XtraGrid.Menu.GridViewMenu(sender as GridView);
         }
         AgendaViewMenuBuilder.GenerateContextMenu(this, e.Menu, OwnerScheduler, null);
     }
 }