Hi Yoni,
1. How I register to the event of "changing of the selected item"
>>>>>>
You can register the SelectedValueChanged event with the help of the gridcell Renderer. Please refer this code snippets:
GridCurrentCell cc = e.TableControl.CurrentCell;
GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer;
if( cr != null)
{
cr.ListBoxPart.SelectedValueChanged+=new EventHandler(ListBoxPart_SelectedValueChanged);
}
2.How I get the new value of the selected item?
>>>>>>
You can get the value of the SelectedItem in the combobox using the ListBoxPart.SelectedValue. You have to handle CurrentCellCloseDropDown event to get this working. Please refer to the following code snippet
void gridDataBoundGrid1_CurrentCellCloseDropDown(object sender, Syncfusion.Windows.Forms.PopupClosedEventArgs e)
{
if (e.PopupCloseType == Syncfusion.Windows.Forms.PopupCloseType.Done)
{
GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer;
if (cr != null)
{
Console.WriteLine(cr.ListBoxPart.SelectedValue);
}
}
}
3. When making a selection in the combobox cell, the selected value appears properly in a grid. Please refer to the attached sample, and here you can show the selected value in the grid cell.
Sample:
http://www.syncfusion.com/Support/user/uploads/GDBG_Combo_cf4500d2.zipBest regards,
Haneef