protected override void PrintRowCell(int rowHandle, GridCellInfo cell, System.Drawing.Rectangle r) { IIconSelector iconSelector = cell.Editor as IIconSelector; if (iconSelector != null) { MyRepositoryItemMemoEdit.IconSelectionEventHandler EH = new MyRepositoryItemMemoEdit.IconSelectionEventHandler(iconSelector_OnIconSelection); iconSelector.OnIconSelection += EH; nowPrintingCellInfo = cell; try { base.PrintRowCell(rowHandle, cell, r); } finally { iconSelector.OnIconSelection -= EH; } } else { base.PrintRowCell(rowHandle, cell, r); } }
protected override void DrawCellEdit(GridViewDrawArgs e, BaseEditViewInfo editInfo, GridCellInfo cell, AppearanceObject appearance, bool isSelectedCell) { IIconSelector iconSelector = cell.Editor as IIconSelector; if (iconSelector != null) { MyRepositoryItemMemoEdit.IconSelectionEventHandler EH = new MyRepositoryItemMemoEdit.IconSelectionEventHandler(iconSelector_OnIconSelection); iconSelector.OnIconSelection += EH; nowDrawingCellInfo = cell; try { base.DrawCellEdit(e, editInfo, cell, appearance, isSelectedCell); } finally { iconSelector.OnIconSelection -= EH; } } else { base.DrawCellEdit(e, editInfo, cell, appearance, isSelectedCell); } }