dポイントプレゼントキャンペーン実施中!

下記サイトからTreeGridViewのソースをダウンロードし、自分のプログラムに組み込みました。
http://blogs.msdn.com/b/markrideout/archive/2006 …

そして下記の通りnameColumnというカラムを追加し、ReadOnly=falseにしましたが、ダブルクリックしても入力することができません。
(お恥ずかしながら初心者です・・・)
nameColumnに入力可能にする方法をご存じの方がいたらご教授願います。



private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
AdvancedDataGridView.TreeGridNode treeGridNode1 = new AdvancedDataGridView.TreeGridNode();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.treeGridView1 = new AdvancedDataGridView.TreeGridView();
this.treeColumn = new AdvancedDataGridView.TreeGridColumn();
this.nameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.treeGridView1)).BeginInit();
this.SuspendLayout();
//
// treeGridView1
//
this.treeGridView1.AllowUserToAddRows = false;
this.treeGridView1.AllowUserToDeleteRows = false;
this.treeGridView1.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.SingleVertical;
this.treeGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.treeColumn,
this.nameColumn});
this.treeGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.treeGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
this.treeGridView1.Location = new System.Drawing.Point(0, 0);
this.treeGridView1.Name = "treeGridView1";
treeGridNode1.Height = 21;
this.treeGridView1.Nodes.Add(treeGridNode1);
this.treeGridView1.RowHeadersVisible = false;
this.treeGridView1.Size = new System.Drawing.Size(361, 267);
this.treeGridView1.TabIndex = 0;
//
// treeColumn
//
this.treeColumn.HeaderText = "Tree";
this.treeColumn.Name = "treeColumn";
this.treeColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// nameColumn
//
this.nameColumn.HeaderText = "Name";
this.nameColumn.Name = "nameColumn";
this.nameColumn.ReadOnly = false;
this.nameColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(361, 267);
this.Controls.Add(this.treeGridView1);
this.Name = "Form1";
this.Text = "Form1";
((System.ComponentModel.ISupportInitialize)(this.treeGridView1)).EndInit();
this.ResumeLayout(false);

}

#endregion

private AdvancedDataGridView.TreeGridView treeGridView1;
private AdvancedDataGridView.TreeGridColumn treeColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn nameColumn;

A 回答 (1件)

TreeGridView1のEditModeプロパティは何になっていますか?


EditProgrammaticallyになっている場合はダブルクリックでの編集は出来ないようです
BeginEditを呼ぶようにプログラミングしないといけない見たいですよ

当方の環境ではダブルクリックというより シングルクリックを2回といった感じです
行を選択、項目をクリックといった感じです
    • good
    • 0
この回答へのお礼

ありがとうございます!!
ご回答のおかげで無事解決できました!

お礼日時:2012/01/21 21:44

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!