How to programmatically expand a GridViewComboBoxColumn

1 Answer 15 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

1 Answer, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 22 Jan 2026, 05:25 PM

Hello, Bob,

To programmatically expand the dropdown of a GridViewComboBoxColumn (e.g., "colReason"), you can use the following approach:

  • Set BeginEditMode to BeginEditProgrammatically: 
  • Access the active editor and call its ShowPopup() method to open the dropdown.

For test purposes, I am using the CellClick event:

this.radGridView1.BeginEditMode = RadGridViewBeginEditMode.BeginEditProgrammatically;

private void RadGridView1_CellClick(object sender, GridViewCellEventArgs e)
{
    GridComboBoxCellElement cell = sender as GridComboBoxCellElement;
	this.radGridView1.BeginEdit();
    RadDropDownListEditor editor = cell.Editor as RadDropDownListEditor;
    RadDropDownListEditorElement el =editor.EditorElement as RadDropDownListEditorElement;
	el.ShowPopup();
}

However, your scenario is a bit complex as you want to open the second editor upon a value set in another cell. RadGridView has a complex mechanism to handle edit operations for different cells. The editing behavior depends on GridRowBehavior. If you need to customize the logic that handles row behavior, you can customize it according to your needs. The following article provides further information on this topic: WinForms GridView Visual Elements Rows Row behaviors

CellValidating event fires when a cell loses focus and is a convenient way to perform validation for the same cell. If I understand correctly, you need to open another editor at the same time. By default, when a cell enters edit mode reflecting user interaction as click with the mouse button left, then RadGridView activates an editor. When RadGridView is not in read-only mode users can edit the contents of the current cell. Usually this process starts by typing in the cell or by pressing F2: WinForms GridView Features Editing Editors Editors - Telerik UI for WinForms

To my opinion, it might be confusing if the user selects an option from one column, let's say "Lost" and then another pop-up in a different column opens. Would it be possible to highlight the Reason Column or a specific cell in this column so the user can click, then choose a reason? Alternatively, you can cancel the validation in CellValidating and show a message for the user to choose a reason from another column.

If you have further questions or need to handle additional scenarios, please let me know.

    Regards,
    Nadya | Tech Support Engineer
    Progress Telerik

    Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

    Tags
    GridView
    Asked by
    Gone2TheDogs
    Top achievements
    Rank 2
    Iron
    Veteran
    Answers by
    Nadya | Tech Support Engineer
    Telerik team
    Share this question
    or