/// <summary> /// Event handler for the grid /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gridControl1_GroupAdded(object sender, GroupAddedEventArgs e) { // The GroupAdded event is used for filtering. This event handler is in charge of // collapsing the instance of the filtering group that contains rejected rows and // expanding the instance of the filtering group that contains found rows. // Since the filtering groups do not have a visual representation (no margin, // no header/footer rows), the collapsed group and all its content will not appear // in the grid. if ((this.m_filtered) && (e.Group.Level == 0)) { e.Group.Collapsed = !((bool)e.Group.Key); } }
void OnGroupAddedToRepository(object sender, GroupAddedEventArgs e) { var viewModel = new GroupViewModel(e.NewGroup, _groupRepository); this.AllGroups.Add(viewModel); }