Skip to main content
Version: 4.2

KanbanBoard

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.2.0.0)

Displays bound records in draggable status lanes with cancellable moves and work-in-progress limits.

public class KanbanBoard : Control

StatusMember must name a writable property for moves. OrderMember, when specified, is rewritten to consecutive zero-based positions in affected lanes. Without it, moves use a session-local order until the source is replaced. Unmapped records remain in the source but are not displayed. BindingList and collection/property notifications refresh the board; call RefreshData for plain lists.

Example:

var board = new KanbanBoard { Dock = DockStyle.Fill, StatusMember = "Status", TitleMember = "Title" };
board.Columns.Add(new KanbanColumn { Text = "Backlog", Value = "todo" });
board.Columns.Add(new KanbanColumn { Text = "In progress", Value = "doing", WipLimit = 3 });
board.DataSource = jobs; // An IList or a BindingSource.
board.CardMoving += (sender, e) => e.Cancel = !MayMove(e.Item);
this.Controls.Add(board);

Constructors​

Instance member KanbanBoard()​

Creates an empty board with draggable cards and four-column-friendly default geometry.

Properties​

Instance member AllowDrag​

Boolean: Gets or sets whether browser drag and keyboard move requests are accepted. (Default: True)

This card-level setting is independent of Control.AllowDrag, which applies to dragging the board surface itself. The surface remains non-draggable; programmatic MoveCard calls are still allowed.

Instance member AllowReorder​

Boolean: Gets or sets whether cards may be reordered within their current column. (Default: True)

Instance member AutoSizeColumns​

Boolean: Gets or sets whether columns share available width while retaining ColumnWidth as their minimum. (Default: True)

Instance member AvatarMember​

String: Gets or sets the optional person-name property displayed as initials. (Default: "")

Instance member CardTemplate​

Type: Gets or sets a concrete UserControl type with a public parameterless constructor. (Default: null)

Null uses built-in cards. Instances are created only for visible cards, owned by the board, and disposed when no longer visible. Tag receives the record. Implement IKanbanCardTemplate to receive DataItem during creation and refresh; interactive children handle their own input.

Example:

board.CardTemplate = typeof(MyJobCard); // UserControl implementing IKanbanCardTemplate.

Instance member Columns​

KanbanColumnCollection: Gets the ordered status columns. Values must be unique when data is displayed or moved.

Instance member ColumnWidth​

Int32: Gets or sets the fixed or minimum lane width in pixels. (Default: 260)

Instance member DataSource​

Object: Gets or sets the IList, IListSource, DataTable, or BindingSource supplying records. (Default: null)

Null clears the board. Records must be non-null reference objects and cannot occur twice. Replacing the source disposes all custom templates and resets session-local ordering.

Protected member DefaultSize​

Size: Gets the default board dimensions.

Instance member Focusable​

Boolean: Gets or sets whether the board surface can receive focus. Defaults to false. (Default: False)

Instance member MaxVisibleCards​

Int32: Gets or sets the initial visible cards per column. The More button expands that column. (Default: 20)

Instance member MetaMember​

String: Gets or sets the optional secondary text property. (Default: "")

Instance member MoreItemsText​

String: Gets or sets the localized override for the "+ {0} more" 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 hidden card count. Used for the CLDR other category of the current UI culture. Literal braces can be written as {{ and }}.

Instance member MoreItemText​

String: Gets or sets the localized override for the "+ {0} more" 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 hidden card count. Used for the CLDR one category of the current UI culture. Literal braces can be written as {{ and }}.

Instance member OrderMember​

String: Gets or sets the optional writable numeric sort property. Empty retains session-local order. (Default: "")

Instance member ProgressMember​

String: Gets or sets the optional finite percentage property, clamped to zero through 100 for display. (Default: "")

Instance member StatusMember​

String: Gets or sets the writable property mapped to column Value. (Default: "Status")

Instance member TabStop​

Boolean: Gets or sets whether the board itself participates in tab navigation. Cards remain independently focusable. (Default: False)

Instance member TagMember​

String: Gets or sets the optional card tag text property. (Default: "")

Instance member TagToneMember​

String: Gets or sets the optional MeterTone name or value property for card tags. (Default: "")

Instance member TitleMember​

String: Gets or sets the literal card title property. (Default: "Title")

Methods​

Protected member Dispose(disposing)​

Releases source subscriptions and owned custom templates.

ParameterTypeDescription
disposingBooleanWhether managed resources are released.

Instance member MoveCard(item, column, index)​

Requests a move, validates the destination, and writes the bound status and optional order.

ParameterTypeDescription
itemObjectRecord in DataSource.
columnKanbanColumnDestination owned by this board.
index optionalInt32Zero-based position, or -1 to append.

Returns: Boolean. True when the move is committed or already at that position.

Index is the destination position after removing the moving card; -1 appends. False indicates cancellation, a disabled destination, a WIP rejection, or a forbidden same-column reorder. Programmatic moves do not require AllowDrag. Read-only or incompatible data members throw. Property setter failures attempt to restore prior values; source setters should support rollback.

Example:

bool accepted = board.MoveCard(job, board.Columns[1], 0);

Protected member OnCardClick(e)​

Raises CardClick for subscribers and derived controls.

ParameterTypeDescription
eKanbanCardEventArgsEvent data.

Protected member OnCardDoubleClick(e)​

Raises CardDoubleClick for subscribers and derived controls.

ParameterTypeDescription
eKanbanCardEventArgsEvent data.

Protected member OnCardMoved(e)​

Raises CardMoved for subscribers and derived controls.

ParameterTypeDescription
eKanbanCardMoveEventArgsEvent data.

Protected member OnCardMoving(e)​

Raises CardMoving for subscribers and derived controls.

ParameterTypeDescription
eKanbanCardMoveEventArgsEvent data.

Protected member OnWebEvent(e)​

Dispatches browser requests to validated server handlers.

ParameterTypeDescription
eWisejEventArgsClient event data.

Protected member OnWebRender(config)​

Renders independent behavior and layout settings and a revisioned column/card snapshot.

ParameterTypeDescription
configObjectClient configuration.

Protected member OnWipLimitExceeded(e)​

Raises WipLimitExceeded for subscribers and derived controls.

ParameterTypeDescription
eKanbanCardMoveEventArgsEvent data.

Instance member RefreshCard(item)​

Refreshes the presentation of a source record without replacing the source.

ParameterTypeDescription
itemObjectRecord belonging to DataSource.

Instance member RefreshData()​

Refreshes the bound list, template records, and browser snapshot after plain-list changes.

Events​

Instance member CardClick​

EventHandler<KanbanCardEventArgs> Occurs when a card is clicked or activated with Enter or Space.

Instance member CardDoubleClick​

EventHandler<KanbanCardEventArgs> Occurs when a card is double-clicked.

Instance member CardMoved​

EventHandler<KanbanCardMoveEventArgs> Occurs after status and order changes have been committed.

Instance member CardMoving​

EventHandler<KanbanCardMoveEventArgs> Occurs before a permitted move is committed. Set Cancel to reject it.

Instance member WipLimitExceeded​

EventHandler<KanbanCardMoveEventArgs> Occurs when the destination limit rejects a move. The record is unchanged.

Implements​

NameDescription
IUserDataProvides access to the UserData and Tag properties associated to the component implementing this interface.
IBindableComponentBindable components implement this interface.
IDropTargetControls that support drag & drop operations implement this interface.
IWisejComponentAll wisej components implement this interface.
IWisejControlAll wisej controls derived from the Control class must implement this interface.
IWisejSerializableAllows an object to serialize itself.