protected void OnPopupMenuClick(SourceGrid.CellContextEventArgs args) { if (m_PopupMenuClick != null) { m_PopupMenuClick(this, args); } }
/// <summary> /// /// </summary> /// <param name="Sender"></param> /// <param name="e"></param> protected void SgGridView_DoubleClickCell(System.Object Sender, SourceGrid.CellContextEventArgs e) { // double click on grid row activates the first menu item from the context menu if (ContextMenu1.MenuItems.Count > 0) { FGridPreview.MenuItemClick(ContextMenu1.MenuItems[0], null); } }
private void grdOutreachOptionDoubleClick(System.Object sender, SourceGrid.CellContextEventArgs e) { int Row = e.CellContext.Position.Row; if (Row >= 0) { FUnitTable.DefaultView[Row]["Is Selected"] = (System.Object)((!(Boolean)(FUnitTable.DefaultView[Row]["Is Selected"]))); } }
private void grdFieldDoubleClick(System.Object sender, SourceGrid.CellContextEventArgs e) { int Row = e.CellContext.Position.Row; if (Row >= 0) { FUnitTableList.DefaultView[Row]["Selection"] = (System.Object)((!(Boolean)(FUnitTableList.DefaultView[Row]["Selection"]))); } }
private void GridPopupMenuItem_Click(object sender, EventArgs e) { MenuItem mi = (MenuItem)sender; if (mi != null) { SourceGrid.CellContextEventArgs args = new SourceGrid.CellContextEventArgs(m_CellContext); this.m_Command = mi.Tag.ToString(); OnPopupMenuClick(args); } }
/// <summary> /// Grid popup menu 點擊事件處裡常式。 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void GridMenu_Click(object sender, SourceGrid.CellContextEventArgs e) { PopupMenuController menuCtrl = (PopupMenuController)sender; SourceGrid.CellContext cell = e.CellContext; SourceGrid.Grid grid = (SourceGrid.Grid)cell.Grid; int row = cell.Position.Row; int col = cell.Position.Column; switch (menuCtrl.Command) { case "Edit": EditCell(grid, row, col); break; case "Insert": InsertCell(grid, row, col); break; case "InsertBlank": // 插入空方 InsertBlankCell(grid, row, col, 1); break; case "Append": // 在列尾插入空方 AppendCell(grid, row, col); break; case "InsertLine": // 插入一列 InsertLine(grid, row, col); break; case "Delete": DeleteCell(grid, row, col); break; case "Backspace": BackspaceCell(grid, row, col); break; case "DeleteLine": DeleteLine(grid, row, col, true); break; default: break; } }
void grdConferences_DoubleClickCell(object Sender, SourceGrid.CellContextEventArgs e) { Accept(e, null); }
private void GrdDetail_DoubleClickCell(System.Object Sender, SourceGrid.CellContextEventArgs e) { ViewPartner(this, null); }
private void grdDetails_DoubleClickCell(object Sender, SourceGrid.CellContextEventArgs e) { Accept(e, null); }