我想改变对我的网格单元格的关注。
假设我点击一个单元格[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);
}
}
关于c# - 改变对基础设施超网格的关注?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35769128/