DataGridViewChipColumn
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.2.0.0)
Defines chip presentation for DataGridViewChipCell cells while retaining their bound values.
- C#
- VB.NET
public class DataGridViewChipColumn : DataGridViewColumn, IGridVisualColumn
Public Class DataGridViewChipColumn
Inherits DataGridViewColumn
Implements IGridVisualColumn
Presentation belongs to the column. Member paths resolve against the bound record, or sibling column names in unbound grids. Changes refresh grid data. These columns are read-only; cell clicks still raise the inherited grid CellClick event.
Example:
var column = new DataGridViewChipColumn { Name = "Chip", DataPropertyName = "Value" };
grid.Columns.Add(column);
Constructors
DataGridViewChipColumn()
Creates the typed template and read-only defaults.
Properties
CellTemplate
DataGridViewCell: Gets or sets the required DataGridViewChipCell template.
Closable
Boolean: Gets or sets shows an independent close action without modifying the bound value. (Default: False)
CloseText
String: Gets or sets the localized override for the "Close {0}" text. (Default: null)
The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation. {0} is the item caption. Literal braces can be written as {{ and }}.
ReadOnly
Boolean: Gets or sets whether the user can edit the column's cells. The default is true: the cells have no editor. (Default: True)
ShowDot
Boolean: Gets or sets shows a status dot before the chip text. (Default: False)
ToneMap
IDictionary<String, ChipTone>: Gets the observable case-insensitive map from the unformatted value string to a chip tone.
ToneMember takes precedence when it resolves to a valid tone. Unmapped values use Neutral. Additions, replacements, and removals refresh existing cells; mappings are copied when the column is cloned.
Example:
column.ToneMap["Critical"] = ChipTone.Danger;
column.ToneMap["Healthy"] = ChipTone.Success;
ToneMember
String: Gets or sets tone enum or name member path; overrides ToneMap when valid. (Default: "")
Variant
ChipVariant: Gets or sets chip background and border treatment. (Default: Soft)
Methods
Clone()
Clones presentation settings and owned collections without copying event subscriptions.
Returns: Object. An independent column.
OnChipClick(e)
Raises ChipClick even when a derived class has no subscribed handlers.
| Parameter | Type | Description |
|---|---|---|
| e | DataGridViewVisualCellEventArgs | Activated row and server action. |
OnChipClosed(e)
Raises ChipClosed even when a derived class has no subscribed handlers.
| Parameter | Type | Description |
|---|---|---|
| e | DataGridViewVisualCellEventArgs | Activated row and server action. |
Events
ChipClick
EventHandler<DataGridViewVisualCellEventArgs> Occurs on validated ChipClick activation, without changing the bound record.
ChipClosed
EventHandler<DataGridViewVisualCellEventArgs> Occurs on validated ChipClosed activation, without changing the bound record.
Implements
| Name | Description |
|---|---|
| IUserData | Provides access to the UserData and Tag properties associated to the component implementing this interface. |
| IWisejComponent | All wisej components implement this interface. |
| IWisejSerializable | Allows an object to serialize itself. |