void RefreshNodeCheckState() { this.UncheckAll(); if (_EditData == null) { return; } string Key; foreach (DataRow row in EditData.Rows) { int authority = ConvertLib.ToInt(row[dt_MyRoleAuthority.Authority]); var v = ConvertLib.ToBinaryNums(authority); foreach (int i in v) { Key = String.Format("{0}.{1}", row[dt_MyRoleAuthority.FunctionID], i); TreeListNode node = this.FindNodeByKeyID(Key); if (node == null) { continue; } _TreeListInitial.SetNodeCheckState(node, CheckState.Checked); } } }