I face a problem, please help.
Error I hit when there are three combobox.
Please refer the code with italic characters.
this.comboBox1. DataSource = this.dataSet11. Tables["PANEL"];
this.comboBox2. DataSource = this.dataSet11. Tables["PANEL"].DefaultView;
this.comboBox3. DataSource = dataSet11.Table s["PANEL"];[/
The combobox1 value is as same as combobox3 value.
The combobox2 value is different because Table[""].DefaultView is added.
where combobox1,2,3 values are different at all.
BindingManagerB ase bindManager1;
BindingManagerB ase bindManager2;
BindingManagerB ase bindManager3;
BindingManagerB ase bindManager4;
public Form1()
{
InitializeCompo nent();
}
private void Form1_Load(obje ct sender, EventArgs e)
{
cn1 = new OracleConnectio n(strConn);
using (cn1)
{
cn1.Open();
//da1 = new OracleDataAdapt er("SELECT CLIENTGRPNO, DESCRIPTION, OTHERDESC, PANELCODE, INCLUDEBANDED, BANDEDFLAG, OFFERITEM, OUTPUTDIR, CAUSALPANELCODE , AUDITPANELCODE, MBDTAG_ATTRNO FROM RRS.CLIENT_GROU P_MASTER ORDER BY CLIENTGRPNO", cn1);
da1 = new OracleDataAdapt er("SELECT CLIENTGRPNO, DESCRIPTION, OTHERDESC, OUTPUTDIR, PANELCODE, CAUSALPANELCODE , AUDITPANELCODE FROM RRS.CLIENT_GROU P_MASTER ORDER BY CLIENTGRPNO", cn1);
da1.Fill(this.d ataSet11, "CLIENT_GROUP_M ASTER");
da2 = new OracleDataAdapt er("SELECT CLIENTGRPNO, CLIENTCODE FROM RRS.CLIENT_GROU P_DETAIL ORDER BY CLIENTGRPNO", cn1);
da2.Fill(this.d ataSet11, "CLIENT_GROUP_D ETAIL");
da3 = new OracleDataAdapt er("SELECT CLIENTCODE, CLIENTNAME FROM RRS.CLIENT_MAST ER ORDER BY CLIENTCODE", cn1);
da3.Fill(this.d ataSet11, "CLIENT_MASTER" );
da4 = new OracleDataAdapt er("SELECT PANELCODE, DESCRIPTION FROM RRS.PANEL ORDER BY PANELCODE", cn1);
da4.Fill(this.d ataSet11, "PANEL");
}
this.comboBox1. DataBindings.Ad d("SelectedValu e", ds, "PANEL.DESCRIPT ION");
this.comboBox2. DataBindings.Ad d("SelectedValu e", ds, "PANEL.DESCRIPT ION");
this.comboBox3. DataBindings.Ad d("SelectedValu e", ds, "PANEL.DESCRIPT ION");
this.comboBox1. DataSource = null;
this.comboBox1. DisplayMember = "DESCRIPTIO N";
this.comboBox1. ValueMember = "PANELCODE" ;
this.comboBox1. DataSource = this.dataSet11. Tables["PANEL"];
this.comboBox2. DataSource = null;
this.comboBox2. DisplayMember = "DESCRIPTIO N";
this.comboBox2. ValueMember = "PANELCODE" ;
this.comboBox2. DataSource = this.dataSet11. Tables["PANEL"].DefaultView;
this.comboBox3. DataSource = null;
this.comboBox3. DisplayMember = "DESCRIPTIO N";
this.comboBox3. ValueMember = "PANELCODE" ;
this.comboBox3. DataSource = dataSet11.Table s["PANEL"];
this.bindManage r1 = this.BindingCon text[this.dataSet11, "CLIENT_GROUP_M ASTER"];
this.bindManage r2 = this.BindingCon text[this.dataSet11, "CLIENT_GROUP_D ETAIL"];
this.bindManage r3 = this.BindingCon text[this.dataSet11, "CLIENT_MAS TER"];
this.bindManage r4 = this.BindingCon text[this.dataSet11, "PANEL"];
Binding b1 = new Binding("Text", dataSet11, "CLIENT_GROUP_M ASTER.CGMaster_ Panel.DESCRIPTI ON");
this.comboBox1. DataBindings.Ad d(b1);
Binding b2 = new Binding("Text", dataSet11, "CLIENT_GROUP_M ASTER.CGMaster_ CausalPanel.DES CRIPTION");
this.comboBox2. DataBindings.Ad d(b2);
Binding b3 = new Binding("Text", dataSet11, "CLIENT_GROUP_M ASTER.CGMaster_ AuditPanel.DESC RIPTION");
this.comboBox3. DataBindings.Ad d(b3);
}
Error I hit when there are three combobox.
Please refer the code with italic characters.
this.comboBox1. DataSource = this.dataSet11. Tables["PANEL"];
this.comboBox2. DataSource = this.dataSet11. Tables["PANEL"].DefaultView;
this.comboBox3. DataSource = dataSet11.Table s["PANEL"];[/
The combobox1 value is as same as combobox3 value.
The combobox2 value is different because Table[""].DefaultView is added.
where combobox1,2,3 values are different at all.
BindingManagerB ase bindManager1;
BindingManagerB ase bindManager2;
BindingManagerB ase bindManager3;
BindingManagerB ase bindManager4;
public Form1()
{
InitializeCompo nent();
}
private void Form1_Load(obje ct sender, EventArgs e)
{
cn1 = new OracleConnectio n(strConn);
using (cn1)
{
cn1.Open();
//da1 = new OracleDataAdapt er("SELECT CLIENTGRPNO, DESCRIPTION, OTHERDESC, PANELCODE, INCLUDEBANDED, BANDEDFLAG, OFFERITEM, OUTPUTDIR, CAUSALPANELCODE , AUDITPANELCODE, MBDTAG_ATTRNO FROM RRS.CLIENT_GROU P_MASTER ORDER BY CLIENTGRPNO", cn1);
da1 = new OracleDataAdapt er("SELECT CLIENTGRPNO, DESCRIPTION, OTHERDESC, OUTPUTDIR, PANELCODE, CAUSALPANELCODE , AUDITPANELCODE FROM RRS.CLIENT_GROU P_MASTER ORDER BY CLIENTGRPNO", cn1);
da1.Fill(this.d ataSet11, "CLIENT_GROUP_M ASTER");
da2 = new OracleDataAdapt er("SELECT CLIENTGRPNO, CLIENTCODE FROM RRS.CLIENT_GROU P_DETAIL ORDER BY CLIENTGRPNO", cn1);
da2.Fill(this.d ataSet11, "CLIENT_GROUP_D ETAIL");
da3 = new OracleDataAdapt er("SELECT CLIENTCODE, CLIENTNAME FROM RRS.CLIENT_MAST ER ORDER BY CLIENTCODE", cn1);
da3.Fill(this.d ataSet11, "CLIENT_MASTER" );
da4 = new OracleDataAdapt er("SELECT PANELCODE, DESCRIPTION FROM RRS.PANEL ORDER BY PANELCODE", cn1);
da4.Fill(this.d ataSet11, "PANEL");
}
this.comboBox1. DataBindings.Ad d("SelectedValu e", ds, "PANEL.DESCRIPT ION");
this.comboBox2. DataBindings.Ad d("SelectedValu e", ds, "PANEL.DESCRIPT ION");
this.comboBox3. DataBindings.Ad d("SelectedValu e", ds, "PANEL.DESCRIPT ION");
this.comboBox1. DataSource = null;
this.comboBox1. DisplayMember = "DESCRIPTIO N";
this.comboBox1. ValueMember = "PANELCODE" ;
this.comboBox1. DataSource = this.dataSet11. Tables["PANEL"];
this.comboBox2. DataSource = null;
this.comboBox2. DisplayMember = "DESCRIPTIO N";
this.comboBox2. ValueMember = "PANELCODE" ;
this.comboBox2. DataSource = this.dataSet11. Tables["PANEL"].DefaultView;
this.comboBox3. DataSource = null;
this.comboBox3. DisplayMember = "DESCRIPTIO N";
this.comboBox3. ValueMember = "PANELCODE" ;
this.comboBox3. DataSource = dataSet11.Table s["PANEL"];
this.bindManage r1 = this.BindingCon text[this.dataSet11, "CLIENT_GROUP_M ASTER"];
this.bindManage r2 = this.BindingCon text[this.dataSet11, "CLIENT_GROUP_D ETAIL"];
this.bindManage r3 = this.BindingCon text[this.dataSet11, "CLIENT_MAS TER"];
this.bindManage r4 = this.BindingCon text[this.dataSet11, "PANEL"];
Binding b1 = new Binding("Text", dataSet11, "CLIENT_GROUP_M ASTER.CGMaster_ Panel.DESCRIPTI ON");
this.comboBox1. DataBindings.Ad d(b1);
Binding b2 = new Binding("Text", dataSet11, "CLIENT_GROUP_M ASTER.CGMaster_ CausalPanel.DES CRIPTION");
this.comboBox2. DataBindings.Ad d(b2);
Binding b3 = new Binding("Text", dataSet11, "CLIENT_GROUP_M ASTER.CGMaster_ AuditPanel.DESC RIPTION");
this.comboBox3. DataBindings.Ad d(b3);
}
Comment