Exemple #1
0
        protected override void OnCellBeginEdit(DataGridViewCellCancelEventArgs e)
        {
            var e2 = new TreeDataGridViewCellCancelEventArgs(e.ColumnIndex, GetRowHierarchyForRowIndex(e.RowIndex));

            if (CellBeginEdit != null)
            {
                CellBeginEdit(this, e2);
            }
            e.Cancel = e2.Cancel;
            base.OnCellBeginEdit(e);
        }
        void dataGridView_CellBeginEdit(object sender, TreeDataGridViewCellCancelEventArgs e)
        {
            // child rows (analysis parameters) can't be edited
            if (e.RowIndexHierarchy.Count > 1)
            {
                e.Cancel = true;
                return;
            }

            uneditedValue = (dataGridView[e.ColumnIndex, e.RowIndexHierarchy].Value ?? String.Empty).ToString();

            if (e.ColumnIndex == databaseColumn.Index)
            {
                string filename = Path.GetFileName(uneditedValue);
                databaseColumn.OpenFileDialog.Title    = "Find the FASTA database (" + filename + ")";
                databaseColumn.OpenFileDialog.FileName = filename;
            }
        }
        void dataGridView_CellBeginEdit (object sender, TreeDataGridViewCellCancelEventArgs e)
        {
            // child rows (analysis parameters) can't be edited
            if (e.RowIndexHierarchy.Count > 1)
            {
                e.Cancel = true;
                return;
            }

            uneditedValue = (dataGridView[e.ColumnIndex, e.RowIndexHierarchy].Value ?? String.Empty).ToString();

            if (e.ColumnIndex == databaseColumn.Index)
            {
                string filename = Path.GetFileName(uneditedValue);
                databaseColumn.OpenFileDialog.Title = "Find the FASTA database (" + filename + ")";
                databaseColumn.OpenFileDialog.FileName = filename;
            }
        }
 protected override void OnCellBeginEdit(DataGridViewCellCancelEventArgs e)
 {
     var e2 = new TreeDataGridViewCellCancelEventArgs(e.ColumnIndex, GetRowHierarchyForRowIndex(e.RowIndex));
     if (CellBeginEdit != null)
         CellBeginEdit(this, e2);
     e.Cancel = e2.Cancel;
     base.OnCellBeginEdit(e);
 }