[英]Change focus on the infragistics ultra grid?
我想改變我的網格單元格的焦點。
假設我單擊一個單元格[1,1]然后我想將焦點設置在單元格[1,2]上 。
其中cell[1,1]
表示(第1列)和第(第1行)的單元格
您可以使用AfterCellActivate事件並編寫此代碼
void grid_AfterCellActivate(object sender, EventArgs e)
{
if (grid.ActiveCell != null &&
grid.ActiveCell.Column.Index == 1 &&
grid.ActiveCell.Row.Index == 1)
{
grid.ActiveCell = grid.Rows[1].Cells[2];
// And if you want also to automatically
// put your cell in edit mode add this line
grid.PerformAction(UltraGridAction.EnterEditMode);
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.