使用布尔值判断某个 UltraGrid 列是否为活动列

Using a boolean to determine whether a certain UltraGrid column is the active column

只有当某个 UltraGridColumn 处于活动状态时,我才需要调用子程序。 在 CellListSelect 方法中,我试图按照

的方式做一些事情
If UltraGrid.Rows(0).IsActiveColumn("my_Column") = True Then
   subroutine(parameters)
  Else
End If

但我一直想不出正确的方法。它需要一个单独的子程序吗?或者可以按照描述的格式完成吗?

我假设您的代码在 CellListSelect 事件处理程序中,因此您可以编写

if e.Cell.Column.Key = "my_Column") Then
    MessageBox.Show("my_Column")

    ....

End If

作为 e 实例的名称 CellEventArgs 参数传递给 CellListSelect