private void SelectListVieItems(bool SelectItem) { if (SecurityTabControl.SelectedIndex == 0) { ModulesListView.UnselectAll(); foreach (DataRowView drv in mi9ModuleDV) { drv["Enabled"] = SelectItem ? "True" : "False"; } } else { TaskListView.UnselectAll(); } }
private void RefreshSecurityGroups() { //if ( SecurityGroupsListBox.Items.Count <= 0) //{ ComboBoxItem SelectCbi = (ComboBoxItem)AgencyComboBox.SelectedItem; string i9AgencyID = SelectCbi.Tag.ToString(); SecurityGroupsListBox.DisplayMemberPath = "SecurityGroupName"; SecurityGroupsListBox.SelectedValuePath = "i9SecurityGroupID"; m_SecurityGroupsDV = new DataView(mSecurityDS.Tables["i9SecurityGroup"]); m_SecurityGroupsDV.RowFilter = "i9AgencyID = '" + i9AgencyID + "'"; SecurityGroupsListBox.ItemsSource = m_SecurityGroupsDV; //SecurityGroupsDV = new DataView(); //SecurityGroupsDV.Table = this.SecurityGroupDS.Tables["i9SecurityGroups"]; //this.DataContext = this.SecurityGroupsDV; this.MainDockPanel.DataContext = this.m_SecurityGroupsDV; //} //Unselect all checkboxes //SecurityGroupsListBox.UnselectAll(); ModulesListView.UnselectAll(); TaskListView.UnselectAll(); SetSecurityGroupNameButtons(true); //Select the first item in the nav group if (SecurityGroupsListBox.SelectedItem == null) { if (SecurityGroupsListBox.Items.Count > 0) { SecurityGroupsListBox.SelectedIndex = 0; } } }