Class GridDropDownCellModel
Implements the data or model part for a drop-down cell.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public class GridDropDownCellModel : GridTextBoxCellModel, ISerializable, IDisposable
Remarks
You typically access cell models through the CellModels property of the GridModel class.
A GridDropDownCellModel can serve as model for several GridDropDownCellRenderer instances if there are several GridControlBase views for a GridModel.
See GridDropDownCellRenderer for more detailed information about this cell type.
Constructors
GridDropDownCellModel(GridModel)
Initializes a new GridDropDownCellModel object and stores a reference to the GridModel this cell belongs to.
Declaration
public GridDropDownCellModel(GridModel grid)
Parameters
Type | Name | Description |
---|---|---|
GridModel | grid | The GridModel for this cell model. |
Remarks
You typically access cell models through the CellModels property of the GridModel class.
GridDropDownCellModel(SerializationInfo, StreamingContext)
Initializes a new GridDropDownCellModel from a serialization stream.
Declaration
protected GridDropDownCellModel(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | An object that holds all the data needed to serialize or de-serialize this instance. |
System.Runtime.Serialization.StreamingContext | context | Describes the source and destination of the serialized stream specified by info. |
Properties
SupportsChoiceList
Gets or sets a value indicating whether cells with this cell type should fill the drop-down list with items from the choice list or data source in GridStyleInfo.
Declaration
public bool SupportsChoiceList { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
If you implement a custom combo box or drop-down list and you do want the item list to be independent from cell settings (and share the same item list among all cells with this cell type) you should set SupportsChoiceList to be False.
Methods
CreateRenderer(GridControlBase)
Throws NotImplemented exception.
Declaration
public override GridCellRendererBase CreateRenderer(GridControlBase control)
Parameters
Type | Name | Description |
---|---|---|
GridControlBase | control | The grid control. |
Returns
Type | Description |
---|---|
GridCellRendererBase | NotImplemented exception. |
Overrides
GetObjectData(SerializationInfo, StreamingContext)
Implements the ISerializable interface and returns the data needed to serialize the cell model.
Declaration
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | A SerializationInfo object containing the information required to serialize the cell model. |
System.Runtime.Serialization.StreamingContext | context | A StreamingContext object containing the source and destination of the serialized stream. |
Overrides
OnQueryPrefferedClientSize(Graphics, Int32, Int32, GridStyleInfo, GridQueryBounds)
Calculates the preferred size of the cell based on its contents without margins and any buttons.
Declaration
protected override Size OnQueryPrefferedClientSize(Graphics g, int rowIndex, int colIndex, GridStyleInfo style, GridQueryBounds queryBounds)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g | The System.Drawing.Graphics context of the canvas. |
System.Int32 | rowIndex | The row index. |
System.Int32 | colIndex | The column index. |
GridStyleInfo | style | The GridStyleInfo object that holds cell information. |
GridQueryBounds | queryBounds | graphical bounds |
Returns
Type | Description |
---|---|
System.Drawing.Size | The optimal size of the cell. |