void uTree_AfterActivate(object sender, NodeEventArgs e) { string gba01; try { //if (_isInDeleteing == true) // return; if (e.TreeNode == null)//有可能連根節點都刪掉了 { return; } gba01 = e.TreeNode.Key; var position = BindingMaster.Find("gba01", gba01); if (position == -1) { return; } BindingMaster.Position = position; } catch (Exception ex) { throw ex; } }
void ultraTree1_AfterActivate(object sender, NodeEventArgs e) { try { var activeNode = e.TreeNode; if (!GlobalFn.varIsNull(e.TreeNode.Cells["keySelf"].Value)) { int position = BindingMaster.Find("keySelf", e.TreeNode.Cells["keySelf"].Value.ToString()); if (position >= 0) { BindingMaster.Position = position; } } } catch (Exception ex) { throw ex; } }