AD
Administrator
Syncfusion Team
October 3, 2006 05:01 AM UTC
Hi Vito,
You can use the GetCellRenderer method to get the reference to the GridComboBoxCellRenderer in a grid and use the ListBoxPart.SelectedItem property to get the selected item of the combo box cell. Below is a code snippet
GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
GridStyleInfo style = this.gridDataBoundGrid1.Model[cc.RowIndex,5];
GridComboBoxCellRenderer cr = this.gridDataBoundGrid1.GetCellRenderer( cc.RowIndex,5) as GridComboBoxCellRenderer;
if( cr != null)
{
DataRowView row = cr.ListBoxPart.SelectedItem as DataRowView;
Console.WriteLine( ":::"+ row[0] + ">>>" + style.CellValue );
}
Thanks,
Haneef