private void LoadTrainingTypes() { dtValues = new DataTable(); objTypes = new TraineeTypes(); dtValues = objTypes.GetTraineeTypes(); DataRow dr = dtValues.NewRow(); dr[0] = 0; dr[1] = "-- Select Trainee Type --"; dtValues.Rows.InsertAt(dr, 0); cmbBoxTraineeTypes.DataSource = dtValues; cmbBoxTraineeTypes.DisplayMember = "TypeName"; cmbBoxTraineeTypes.ValueMember = "TrainingTypeId"; cmbBoxTraineeTypes.SelectedIndex = -1; }
private void LoadTrainingTypes() { dtTrainingTypes = new DataTable(); // DataTable dtTypes = new DataTable(); _objTraineeTypeDetails = new TraineeTypes(); dtTrainingTypes = _objTraineeTypeDetails.GetTraineeTypes(); //dgViewTrainingFees.AutoGenerateColumns = false; //dgViewTrainingFees.DataSource = dtTypes; //dtTrainingTypes = dtTypes.Copy(); DataRow dr = dtTrainingTypes.NewRow(); dr[0] = 0; dr[1] = "-- Select Training Type --"; dtTrainingTypes.Rows.InsertAt(dr, 0); cmbTraineeTypes.DataSource = dtTrainingTypes; cmbTraineeTypes.DisplayMember = "TypeName"; cmbTraineeTypes.ValueMember = "TrainingTypeId"; }