2013-09-28 33 views
0

我有一個數據網格,其中有四列說項目名稱,購買率,數量,金額。在這裏我想設置數量單元格可編輯,也選擇單元格內容時,它有焦點,我也想集中到小區說量的細胞時,按Enter鍵從數量列如何實現這一目標的關鍵......Datagrid編輯單元格獲得焦點時

回答

1

這應該工作

//Focus to cell 
dataGrid1.CurrentCell = new DataGridCellInfo(dataGrid1.Items[/*index*/], dataGrid1.Columns[/*index*/]); 
//Begins edit 
dataGrid1.BeginEdit(); 
相關問題