Class XhtmlCellRenderer
Implements the renderer part of a Xhtml cell.
Inherited Members
Namespace: Syncfusion.GridHelperClasses
Assembly: Syncfusion.GridHelperClasses.Windows.dll
Syntax
public class XhtmlCellRenderer : GridCellRendererBase, IQueryFocusInside, IGridDropDownCell, IPopupParent, IPopupItem, IDisposable
Remarks
Use "XhtmlCell" as identifier in CellType of a cells GridStyleInfo to associate this cell type with a cell.
This renderer supports editing the contents of the Xhtml with a dropdown panel. When the user drops the panel a XhtmlEntryPanel is shown and the user can format the text and then accept changes by pressing "Save" button.
Constructors
XhtmlCellRenderer(GridControlBase, GridCellModelBase)
Initializes a new instance of the XhtmlCellRenderer class.
Declaration
public XhtmlCellRenderer(GridControlBase grid, GridCellModelBase cellModel)
Parameters
Type | Name | Description |
---|---|---|
GridControlBase | grid | The GridControlBase that display this cell renderer. |
GridCellModelBase | cellModel | The GridCellModelBase that holds data for this cell renderer that should be shared among views. |
Remarks
References to GridControlBase, and GridCellModelBase will be saved.
Methods
DropDownContainerCloseDropDown(Object, PopupClosedEventArgs)
Overridden to invalidate the grid.
Declaration
public override void DropDownContainerCloseDropDown(object sender, PopupClosedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The source control. |
PopupClosedEventArgs | e | The PopupClosedEventArgs that contains the event data. |
Overrides
DropDownContainerShowedDropDown(Object, EventArgs)
Overridden to set the focus to RichTextBox.
Declaration
public override void DropDownContainerShowedDropDown(object sender, EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The source control. |
System.EventArgs | e | The System.EventArgs that contains the event data. |
Overrides
DropDownContainerShowingDropDown(Object, CancelEventArgs)
Used to set the drop down container appearance.
Declaration
public override void DropDownContainerShowingDropDown(object sender, CancelEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The source control. |
System.ComponentModel.CancelEventArgs | e | The System.ComponentModel.CancelEventArgs that contains the event data. |
Overrides
InitializeDropDownContainer()
Initializes the drop down container part.
Declaration
protected override void InitializeDropDownContainer()
Overrides
OnDraw(Graphics, Rectangle, Int32, Int32, GridStyleInfo)
Overridden to draw the PictureBox.
Declaration
protected override void OnDraw(Graphics g, Rectangle clientRectangle, int rowIndex, int colIndex, GridStyleInfo style)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g | The graphics of a cell. |
System.Drawing.Rectangle | clientRectangle | Cell rectangle. |
System.Int32 | rowIndex | Row index of a cell. |
System.Int32 | colIndex | Column index of a cell. |
GridStyleInfo | style | Cell style. |
Overrides
OnInitialize(Int32, Int32)
Overridden to initialize the control values.
Declaration
protected override void OnInitialize(int rowIndex, int colIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | |
System.Int32 | colIndex |
Overrides
OnSaveChanges()
Stores the changed to cell.
Declaration
protected override bool OnSaveChanges()
Returns
Type |
---|
System.Boolean |
Overrides
PanelCancel(Object, EventArgs)
Event handler for the Cancel event of the XhtmlEntryPanel
Declaration
protected virtual void PanelCancel(object sender, EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The source control. |
System.EventArgs | e | The System.EventArgs that contains the event data. |
PanelKeyDown(Object, KeyEventArgs)
Event handler for the KeyDown event of the XhtmlEntryPanel
Declaration
protected virtual void PanelKeyDown(object sender, KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The source control. |
System.Windows.Forms.KeyEventArgs | e | The System.Windows.Forms.KeyEventArgs that contains the event data. |
PanelSave(Object, EventArgs)
Event handler for the Save event of the XhtmlEntryPanel
Declaration
protected virtual void PanelSave(object sender, EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The source control. |
System.EventArgs | e | The System.EventArgs that contains the event data. |