protected void OnPopupMenuClick(SourceGrid.CellContextEventArgs args)
 {
     if (m_PopupMenuClick != null)
     {
         m_PopupMenuClick(this, args);
     }
 }
Esempio n. 2
0
 /// <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);
            }
        }
Esempio n. 6
0
        /// <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;
            }
        }
Esempio n. 7
0
 void grdConferences_DoubleClickCell(object Sender, SourceGrid.CellContextEventArgs e)
 {
     Accept(e, null);
 }
Esempio n. 8
0
 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);
 }