private void ultraGrid2_BeforeSelectChange(object sender, BeforeSelectChangeEventArgs e) { if (ultraGrid2.Selected.Rows.Count > 0 && (ModifierKeys != Keys.Shift) && (ModifierKeys != Keys.Control)) { if (e.NewSelections.Rows.Count > 0) //clear selection before add { ultraGrid2.Selected.Rows.Clear(); } } }
private void UltraGridInputOnBeforeSelectChange(object sender, BeforeSelectChangeEventArgs e) { if (e.NewSelections == null) return; ViewModel.SelectedEvents.Clear(); foreach (var cell in e.NewSelections.Cells) { var eventCode = (string)cell.Row.GetCellValue("EventCode"); ViewModel.AddEventFromEventName(eventCode); } SelectedItemChanged.RaiseEvent(this, new SelectedItemChangedEventARgs(ViewModel.SelectedEvents.ToArray())); }
private void listaBeforeSelectChange(object sender, BeforeSelectChangeEventArgs e) { if (e.NewSelections.Rows.Count > 0 && e.NewSelections.Rows[0].Band.Key == "Band 0" && !(bool)e.NewSelections.Rows[0].Cells["Selezionabile"].Value) e.Cancel = true; }
private void RelatedGrid_BeforeSelectChange(object sender, BeforeSelectChangeEventArgs e) { MyMenuStrip.Items.Clear(); DisplayControl.Text = ""; }