private void btnbookingsview_Click(object sender, EventArgs e) { ViewMenu form = new ViewMenu(); this.Hide(); form.Show(); }
private void gridView1_MouseDown(object sender, MouseEventArgs e) { GridView view = sender as GridView; // obtaining hit info GridHitInfo hitInfo = view.CalcHitInfo(new Point(e.X, e.Y)); if (((e.Button & MouseButtons.Right) != 0) && (hitInfo.InRow) && (!view.IsGroupRow(hitInfo.RowHandle))) { // switching focus view.FocusedRowHandle = hitInfo.RowHandle; // showing the custom context menu ViewMenu menu = new ViewMenu(view); { { DXMenuItem menuItem = new DXMenuItem("RefreshRow", new EventHandler(this.RefreshFocusedRow)); menuItem.Tag = view; menu.Items.Add(menuItem); } { DXMenuItem menuItem = new DXMenuItem("DeleteRow", new EventHandler(this.DeleteFocusedRow)); menuItem.Tag = view; menu.Items.Add(menuItem); } menu.Show(hitInfo.HitPoint); } } }
protected void CreateAndShowPopupMenu(GridHitInfo hitInfo, GridView view) { var menu = new ViewMenu(view); menu.Items.Add(popupMenuItem); menu.Show(hitInfo.HitPoint); }
private void btnback_Click(object sender, EventArgs e) { ViewMenu menu = new ViewMenu(); this.Hide(); menu.Show(); }
private void grvOrder_MouseDown(object sender, MouseEventArgs e) { var view = sender as GridView; if (view == null) { return; } var hitInfo = view.CalcHitInfo(new Point(e.X, e.Y)); if (((e.Button & MouseButtons.Right) != 0) && (hitInfo.InRow) && (!view.IsGroupRow(hitInfo.RowHandle))) { view.FocusedRowHandle = hitInfo.RowHandle; var menu = new ViewMenu(view); var menuItem = new DXMenuItem("Add New SubMenu Item", new EventHandler(gridView3_AddNewRow)); menuItem.Tag = view; menu.Items.Add(menuItem); //menuItem = new DXMenuItem("Edit Menu Item", new EventHandler(gridView2_EditFocusedRow)); //menuItem.Tag = view; //menu.Items.Add(menuItem); menuItem = new DXMenuItem("Delete Menu Item", null); menuItem.Tag = view; menu.Items.Add(menuItem); menu.Show(hitInfo.HitPoint); } }
private void button2_Click(object sender, EventArgs e) { ViewMenu.Show(PointToScreen(DroplocView.Location)); }