2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
Shows old and new value of comboboxThe CurrentCellCloseDropDown event gets triggered when a dropdown is closed in a Grid cell. You can obtain the new value of the ComboBox by using Currentcell's Renderer property and the old value from the Grid. C# //Hook the Event in Form_Load this.gridControl1.CurrentCellCloseDropDown += gridControl1_CurrentCellCloseDropDown; void gridControl1_CurrentCellCloseDropDown(object sender, Syncfusion.Windows.Forms.PopupClosedEventArgs e) { cc = this.gridControl1.CurrentCell; // show the new value in the ComboBox selected item MessageBox.Show("New Value is " + cc.Renderer.GetCellValue().ToString()); // Show the old value in the ComboBox selected item MessageBox.Show("Old Value is " + this.gridControl1[cc.RowIndex, cc.ColIndex].CellValue.ToString()); } VB 'Hook the Event in Form_Load Me.gridControl1.CurrentCellCloseDropDown += gridControl1_CurrentCellCloseDropDown Private Sub gridControl1_CurrentCellCloseDropDown(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.PopupClosedEventArgs) cc = Me.gridControl1.CurrentCell ' show the new value in the ComboBox selected item MessageBox.Show("New Value is " & cc.Renderer.GetCellValue().ToString()) ' Show the old value in the ComboBox selected item MessageBox.Show("Old Value is " & Me.gridControl1(cc.RowIndex, cc.ColIndex).CellValue.ToString()) End Sub The following screenshot illustrates the output. Figure 1: Displaying the old value of the ComboBox cell. Samples: C#: ComboBoxOldValue VB: ComboBoxOldValue
|
2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.