Example #1
0
        /// <summary>
        /// Activate editor for cell
        /// </summary>
        /// <param name="r"></param>
        /// <param name="c"></param>

        private void EditCellValue(
            int r,
            int c)
        {
            BandedGridView bgv = RulesGrid.MainView as BandedGridView;

            bgv.ClearSelection();
            bgv.SelectCell(r, bgv.Columns[c]);
            bgv.FocusedRowHandle = r;
            bgv.FocusedColumn    = bgv.Columns[c];
            bgv.ShowEditor();             // doesn't seem to open dropdown
            //Application.DoEvents();

            //ColorDialog cd = new ColorDialog();
            //cd.Color = RulesGrid.GetCellBackColor(r, BackColorCol);
            //DialogResult dr = cd.ShowDialog(this);
            //if (dr != DialogResult.OK) return;

            //CellInfo ci = RulesGrid.GetCellInfo(r, c);
            //RulesGrid.DataTable.Rows[ci.DataRowIndex][ci.DataColIndex] = cd.Color;
            //bgv.RefreshRowCell(r, ci.GridColumn);

            //RulesGrid.AddNewRowAsNeeded();
            return;
        }