private void InitailizeData() { this.lblObjectName.Text = string.Format(lblObjectName.Text, _ObjectPath); List <string> possiblePermissions = new List <string>(); if (_securityDescriptor != null && _securityDescriptor.Descretionary_Access_Control_List != null) { Dictionary <string, List <LwAccessControlEntry> > SdDacls = _securityDescriptor.Descretionary_Access_Control_List as Dictionary <string, List <LwAccessControlEntry> >; if (SdDacls != null && SdDacls.Count != 0) { foreach (string key in SdDacls.Keys) { List <LwAccessControlEntry> daclInfo = SdDacls[key]; ListViewItem lvItem = new ListViewItem(new string[] { key }); lvItem.Tag = daclInfo; lvGroupOrUserNames.Items.Add(lvItem); } } possiblePermissions = _securityDescriptor.GetObjectPermissionSet(); if (possiblePermissions.Count != 0) { foreach (string permission in possiblePermissions) { DgPermissions.Rows.Add(new object[] { permission, false, false }); } } if (lvGroupOrUserNames.Items.Count != 0) { lvGroupOrUserNames.Items[0].Selected = true; lvGroupOrUserNames.SelectedIndexChanged += new EventHandler(lvGroupOrUserNames_SelectedIndexChanged); } } }