private static void FocusControl(object ctl) { if (ctl != null) { if (ctl is Control) { BringUpCurrentTab(ctl as Control); (ctl as Control).Select(); } else if (ctl is GridColumn) { var view = (ctl as GridColumn).View as GridView; if (view != null) { BringUpCurrentTab(view.GridControl); view.FocusedColumn = ctl as GridColumn; view.ShowEditor(); } } else { Dbg.DbgAssert(false, "invalid object is passed for focusing"); } } }