JJ
Jisha Joy
Syncfusion Team
November 8, 2010 05:33 AM UTC
Hi David,
To cancel showing the dropdownlist for read-only cells, you can handle the TableControlCurrentCellShowingDropDown event as shown below:
// Event Handler
this.gridGroupingControl1.TableControlCurrentCellShowingDropDown += new Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellShowingDropDownEventHandler(gridGroupingControl1_TableControlCurrentCellShowingDropDown);
// Method Invoked
void gridGroupingControl1_TableControlCurrentCellShowingDropDown(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellShowingDropDownEventArgs e)
{
GridCurrentCell cc = e.TableControl.CurrentCell;
GridTableCellStyleInfo style = e.TableControl.GetTableViewStyleInfo(e.TableControl.CurrentCell.RowIndex, e.TableControl.CurrentCell.ColIndex);
if (cc.Renderer is GridComboBoxCellRenderer && style.ReadOnly)
{
GridComboBoxCellRenderer rend = cc.Renderer as GridComboBoxCellRenderer;
rend.ListBoxPart = null;
}
}
Regards,
Jisha
DM
David Mecteaux
November 12, 2010 03:55 PM UTC
Thank you Jisha,
That worked quite nicely.
JJ
Jisha Joy
Syncfusion Team
November 15, 2010 05:35 AM UTC
Hi David,
Thank you for your update.
Regards,
Jisha