C# - 콤보박스 채우기

// Employee Name is shown in the list displayed
cboEmpName.DisplayMember = empDataSet.Tables["emp"].Columns["ename"].ToString();

// Employee Id is the actual value contained in the list
cboEmpName.ValueMember = empDataSet.Tables["emp"].Columns["empno"].ToString();

// Assign DataSet as a data source for the List Box
cboEmpName.DataSource = empDataSet.Tables["emp"].DefaultView;

 

댓글 남기기