private void BindClassGroupCmb() { //Show existing record list. try { ClassGroup = _ExcuteData._ExecuteDataSet("SELECT class_group_name, class_groupid from class_group_master "); //cmbClassGroup.Items.Insert(0, "--Select--"); cmbClassGroup.DataSource = ClassGroup.Tables[0]; cmbClassGroup.DisplayMember = "class_group_name"; cmbClassGroup.ValueMember = "class_groupid"; } catch (Exception ex) { MessageBox.Show("Error: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
cmbClassGroup.DisplayMember = "class_group_name"; cmbClassGroup.ValueMember = "class_groupid"; cmbClassGroup.DataSource = ClassGroup.Tables[0];
Valuemember
Displaymember
datasource
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)