Articles in this section
Category / Section

How to save ComboBox cell value instantly after the dropdown is closed?

1 min read

In order to save the ComboBox cell value immediately after the dropdown is closed, SaveCellInfo event must be triggered. To initiate SaveCellInfo event, EndEdit() has to be called in the CurrentCellCloseDropDown event.

Code Snippet

C#

//Form()
this.gridControl1. CurrentCellCloseDropDown += gridControl1_CurrentCellCloseDropDown;
 
void gridControl1_CurrentCellCloseDropDown(object sender, PopupClosedEventArgs e)
{
   this.gridControl1.CurrentCell.EndEdit();
}

 

VB

‘Form()
Private Me.gridControl1.CurrentCellCloseDropDown += AddressOf gridControl1_CurrentCellCloseDropDown
 
Private Sub gridControl1_CurrentCellCloseDropDown(ByVal sender As Object, ByVal e As PopupClosedEventArgs)
 Me.gridControl1.CurrentCell.EndEdit()
End Sub
 

 

Screenshot

Showing save the ComboBox cell value

 

Sample Link:

C#: Save_ComboBox_Cellvalue_CS

VB: Save_ComboBox_Cellvalue_VB

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied