static private bool IsGroupValid(IntPtr hwnd, int groupID) { GroupManager manager = WindowsListView._groupsCollection [hwnd]; // check group validity if (!manager.IsGroupIdValid(groupID)) { // Group was disabled but we did not get the needed event // since for some things events are not being sent // (e.g: Going from some LV modes to - List mode, List mode does not have Groups) // alexsn @ throw new InvalidOperationException(SR.Get(SRID.OperationCannotBePerformed)); } return(true); }
static private bool IsGroupValid(IntPtr hwnd, int groupID) { GroupManager manager = WindowsListView._groupsCollection [hwnd]; // check group validity if (!manager.IsGroupIdValid(groupID)) { // Group was disabled but we did not get the needed event // since for some things events are not being sent // (e.g: Going from some LV modes to - List mode, List mode does not have Groups) // Microsoft - We may want to consider raising the event here // The M7 work on checking if LE is valid however is the better way of going // RemoveGroupAndRaiseLogicalChangedEvent(_hwnd); throw new InvalidOperationException(SR.Get(SRID.OperationCannotBePerformed)); } return(true); }