0
我试图将默认值添加到已填充数据源的组合框中。检查图像下方:C# - 为填充数据绑定的组合框添加值?
值从Oracle数据库自动添加。现在我需要做的是再添加一个默认值,它将代表所有类别。
这里是一个设计师代码:
this.comboBox2.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.vRSTEPROBLEMABindingSource, "NAZIV", true));
this.comboBox2.DataSource = this.vRSTEPROBLEMABindingSource1;
this.comboBox2.DisplayMember = "NAZIV";
this.comboBox2.FormattingEnabled = true;
this.comboBox2.Location = new System.Drawing.Point(89, 51);
this.comboBox2.Name = "comboBox2";
this.comboBox2.Size = new System.Drawing.Size(173, 21);
this.comboBox2.TabIndex = 4;
this.comboBox2.Text = "Svi";
this.comboBox2.ValueMember = "NAZIV";
在将数据源设置为绑定源之前,您需要添加默认值。 – msmolcic
我该怎么做? – exort