HA
haneefm
Syncfusion Team
May 23, 2007 03:53 PM UTC
Hi Jose,
You can handle the TableControlCurrentCellCloseDropDown event of the grid and call the CurrentCell.EndEdit method followed by the Table.EndEdit method to commit the selection changes in a Drop Down. Here is a code snippet.
private void gridGroupingControl1_TableControlCurrentCellCloseDropDown(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlPopupClosedEventArgs e)
{
if( e.Inner.PopupCloseType == Syncfusion.Windows.Forms.PopupCloseType.Done)
{
GridCurrentCell cc = e.TableControl.CurrentCell;
if(cc.Renderer is GridComboBoxCellRenderer)
{
e.TableControl.CurrentCell.EndEdit();
e.TableControl.Table.EndEdit();
}
}
}
If you want to catch the new value in a combobox cell, you need to use Renderer.ControlValue property in a TableControlCurrentCellChanged event. Here is a code snippet.
GridCurrentCell cc = e.TableControl.CurrentCell;
if(cc.Renderer is GridComboBoxCellRenderer)
{
Console.WriteLine("New Value" + cc.Renderer.ControlValue);
Console.WriteLine("New Text" + cc.Renderer.ControlText);
}
Best Regards,
Haneef