Bonjour à tous,

J'ai un combobox rempli via une db.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
public class ComboBoxItem
        {
            public string Value;
            public string Text;
            public ComboBoxItem(string val, string text)
            {
                Value = val;
                Text = text;
            }
 
            public override string ToString()
            {
                return Text;
            }
        }
 
 
            var db = new DataClasses2DataContext();
 
            // collone 1
            var md1 = (from m in db.Conditions
                       where m.Collone == 1
                       select new { m.Condition1,m.Id });
 
            foreach (var m in md1)
            {
                comboBoxCondition11.Items.Add(new ComboBoxItem(m.Id.ToString(),m.Condition1));
                comboBoxCondition21.Items.Add(new ComboBoxItem(m.Id.ToString(), m.Condition1));
                comboBoxCondition11.ValueMember = m.Id.ToString();
            }
Je voudrais lors de l'appui d'un boutton ( par exmple ) , sélectionner le combobox ou valuemember = 1 ( par exemple ).

Merci d'avance,