kumar_1981
Jan 29th, 2007, 04:13 PM
Hai
i am using combobox in winforms with c#.
i have binded control with a Datatable
cboEmpName.DisplayMember = "FULLNAME";
cboEmpName.ValueMember = "EMPLOYEEID";
and binded to datasource
cboEmpName.DataSource = tblEMPLOYEE;
now i should have a first member of Combobox as "----select----"
i am trying to
cboEmpName.Items.Insert("test",0);
but it is getting error if i am trying this
i am getting an error
"Items collection cannot be modified when the DataSource property is set."
Please help me in resolving this issue
Thanks and Regards
VInay Kumar
i am using combobox in winforms with c#.
i have binded control with a Datatable
cboEmpName.DisplayMember = "FULLNAME";
cboEmpName.ValueMember = "EMPLOYEEID";
and binded to datasource
cboEmpName.DataSource = tblEMPLOYEE;
now i should have a first member of Combobox as "----select----"
i am trying to
cboEmpName.Items.Insert("test",0);
but it is getting error if i am trying this
i am getting an error
"Items collection cannot be modified when the DataSource property is set."
Please help me in resolving this issue
Thanks and Regards
VInay Kumar