Ejemplo n.º 1
0
        /// <summary>
        /// SPREAD セルが編集状態になった時の処理 EditElementShowingイベント
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void gcSpredGrid_EditElementShowing(object sender, EditElementShowingEventArgs e)
        {
            GcSpreadGrid grid = sender as GcSpreadGrid;

            if (grid.ActiveCell.InheritedCellType is GrapeCity.Windows.SpreadGrid.CheckBoxCellType)
            {
                // チェックボックス型セルのイベントを関連付けます。
                GrapeCity.Windows.SpreadGrid.Editors.CheckBoxEditElement gcchk = grid.EditElement as GrapeCity.Windows.SpreadGrid.Editors.CheckBoxEditElement;
                if (gcchk != null)
                {
                    gcchk.Checked   += checkEdit_Checked;
                    gcchk.Unchecked += checkEdit_Unchecked;
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// sp売上明細データ_EditElementShowing
        /// スプレッドコンボイベント関連付け
        /// デザイン画面でイベント追加
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void sp売上明細データ_EditElementShowing(object sender, EditElementShowingEventArgs e)
        {
            if (e.EditElement is GrapeCity.Windows.SpreadGrid.Editors.GcComboBox)
            {
                GrapeCity.Windows.SpreadGrid.Editors.GcComboBox gccmb = e.EditElement as GrapeCity.Windows.SpreadGrid.Editors.GcComboBox;
                if (gccmb != null)
                {
                    gccmb.SelectionChanged += comboEdit_SelectionChanged;
                }
            }

            if (e.EditElement is GrapeCity.Windows.SpreadGrid.Editors.CheckBoxEditElement)
            {
                GrapeCity.Windows.SpreadGrid.Editors.CheckBoxEditElement gcchk = e.EditElement as GrapeCity.Windows.SpreadGrid.Editors.CheckBoxEditElement;
                if (gcchk != null)
                {
                    gcchk.Checked   += checkEdit_Checked;
                    gcchk.Unchecked += checkEdit_Unchecked;
                }
            }
        }