Exemple #1
0
 private ScheduledUpdate(DataGridComboBox combo, string value)
 {
     this.combo = combo;
     this.value = value;
     timer      = new Timer {
         Interval = 1
     };
     timer.Tick += TickHandler;
     timer.Start();
 }
Exemple #2
0
 /// <summary>
 /// Allows scheduling updates for the specified outline
 /// </summary>
 public static void ScheduleUpdate(DataGridComboBox combo, string value)
 {
     if (combo == null)
     {
         Debug.Fail("Invalid combo");
         return;
     }
     if (combo.scheduledUpdate != null)
     {
         Trace.TraceInformation("There is already scheduled update, ignoring");
         return;                         // just swallow it
     }
     combo.scheduledUpdate = new ScheduledUpdate(combo, value);
 }
Exemple #3
0
        // Constructor - create combobox, register selection change event handler,
        // register lose focus event handler
        public DataGridComboBoxColumn(IServiceProvider serviceProvider)
        {
            if (serviceProvider == null)
            {
                throw new ArgumentNullException("serviceProvider");
            }

            _designerHost = serviceProvider.GetService(typeof(IDesignerHost)) as IDesignerHost;
            Debug.Assert(_designerHost != null, "Expected to be able to get a hold of a designer host.");

            this.cm          = null;
            this.iCurrentRow = -1;
            // Create ComboBox and force DropDownList style
            this.comboBox = new DataGridComboBox(this, serviceProvider);
            this.comboBox.DropDownStyle = ComboBoxStyle.DropDownList;             // default style
        }