protected void SetDataGridViewCellValue(GridViewCostCellDetail costCellDetail, DataGridViewCellValueEventArgs e) { DataGridViewCell currentCell = this.dgvCostLine.Rows[e.RowIndex].Cells[e.ColumnIndex]; if (!(currentCell is DataGridViewComboBoxCell)) { e.Value = costCellDetail.DisplayValue; return; } DataGridViewComboBoxCell comboBoxCell = (DataGridViewComboBoxCell)currentCell; string[][] previousStringArrayList = BindArrayDataHelper.ConvertDataSourceNodesToStringArray(comboBoxCell.DataSource); if (!ArrayUtils.EqualsStringArray(previousStringArrayList, costCellDetail.DataSource)) { DataGridViewHelper.BindComboBoxCellDataSource(comboBoxCell, costCellDetail.DataSource); } e.Value = costCellDetail.Value.ToString(); }