How to programmatically expand a GridViewComboBoxColumn

0 Answers 4 Views
GridView
Gone2TheDogs
Top achievements
Rank 2
Iron
Veteran
Gone2TheDogs asked on 20 Jan 2026, 11:53 PM

I would like to expand a GridViewComboBoxColumn list on the same row where on another column that is set to "Lost". 

(see attached screenshot)
(1) User clicks on a cell and selects "Lost" from a list 

(2) From Cell Event, the "Reason" column (GridViewComboBoxColumn) is automatically expanded so the user knows to select a reason.


		private void dgvSales_CellValidating(object sender, CellValidatingEventArgs e)
		{
			if(e.ColumnIndex >= 0 && e.RowIndex >= 0)
			{

				switch (e.ColumnIndex)
				{
					case int _ when e.ColumnIndex == dgvSales.Columns["colWonLost"].Index:
						if(e.Value.ToString() == "Lost")
						{
							dgvSales.CurrentRow.Cells["colReason"].IsSelected = true;
							
							//Add code here to expand colReason list


							return;
						}
						break;
					default:
						break;
				}
			}

		}  //dgvSales CellValidating

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Gone2TheDogs
Top achievements
Rank 2
Iron
Veteran
Share this question
or