Skip to main content
Version: 4.2

ActionCardList

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.2.0.0)

Displays a data-bound, fixed-height virtual window of ActionCard controls.

public class ActionCardList : Control

Only WindowSize cards exist at once; scrolling disposes outgoing cards and creates incoming cards. This virtualizes controls, not source data: the full IList remains available on the server. Use CardCreated to attach actions and content, storing persistent state in the source record. Content created for a card is disposed with that card when it leaves the window.

Example:

var list = new ActionCardList { Dock = DockStyle.Fill, ItemHeight = 108 };
list.DisplayMembers.Title = "Name";
list.CardCreated += (sender, e) =>
{
e.Card.Actions.Add(new CardAction { Name = "open", Text = "Open" });
e.Card.ActionClick += (s, a) => MessageBox.Show(e.DataItem.ToString());
};
list.DataSource = jobs; // IList, BindingList, DataTable, or BindingSource.
this.Controls.Add(list);

Constructors​

Instance member ActionCardList()​

Initializes an empty virtual list with a 32-card window.

Properties​

Instance member DataMember​

String: Gets or sets the list-valued member resolved from DataSource. Empty uses the source directly. (Default: "")

Instance member DataSource​

Object: Gets or sets the source list, list source, BindingSource, or object resolved through DataMember. (Default: null)

Binding-list and collection notifications rebuild the current window. Plain lists require RefreshData. Source notifications must occur in the owning Wisej session. No data is sent beyond the materialized window.

Protected member DefaultSize​

Size: Gets the default list size.

Instance member DisplayMembers​

ActionCardDisplayMembers: Gets the source property mappings. Set mappings before DataSource when possible.

Instance member Focusable​

Boolean: Gets or sets whether the list can receive the focus. The default is false. (Default: False)

Instance member ItemCount​

Int32: Gets the current number of source records.

Instance member ItemHeight​

Int32: Gets or sets each card's fixed height in pixels. The default is 108. (Default: 108)

Fixed geometry permits accurate virtual scrolling. Choose a height that contains all card text and content.

Instance member ItemSpacing​

Int32: Gets or sets the gap between cards in pixels. The default is 8. (Default: 8)

Instance member MaterializedCount​

Int32: Gets the current number of instantiated cards, never exceeding WindowSize.

Instance member TabStop​

Boolean: Gets or sets whether the list takes part in tab navigation. The default is false. (Default: False)

Instance member WindowSize​

Int32: Gets or sets the maximum number of materialized cards, from 1 through 200. The default is 32. (Default: 32)

The window must cover the viewport plus several offscreen rows. Increasing it reduces scroll requests at the cost of more server controls and DOM widgets; it never changes the source collection.

Methods​

Protected member Dispose(disposing)​

Detaches source notifications and disposes the materialized card window.

ParameterTypeDescription
disposingBooleanWhether managed resources are released.

Protected member OnCardCreated(e)​

Raises CardCreated independently of event subscriptions.

ParameterTypeDescription
eActionCardListItemEventArgsNew card and source record.

Protected member OnDataSourceChanged(e)​

Raises DataSourceChanged.

ParameterTypeDescription
eEventArgsEvent data.

Protected member OnItemClick(e)​

Raises ItemClick.

ParameterTypeDescription
eActionCardListItemEventArgsClicked card and source record.

Protected member OnWebEvent(e)​

Dispatches virtual range requests.

ParameterTypeDescription
eWisejEventArgsClient event.

Protected member OnWebRender(config)​

Serializes only the virtual window and its scroll geometry.

ParameterTypeDescription
configObjectClient configuration.

Instance member RefreshData()​

Rebuilds the current window after a plain source list or its records change.

Existing cards and content are disposed, and CardCreated runs for the refreshed window. The current scroll position is retained and clamped when the source becomes shorter.

Events​

Instance member CardCreated​

EventHandler<ActionCardListItemEventArgs> Occurs after a card is created and mapped, before it enters the displayed window.

Add commands, content, and event handlers here. Do not retain the transient card after it leaves the window. Changing the source from this callback is not supported.

Instance member DataSourceChanged​

EventHandler Occurs after DataSource changes.

Instance member ItemClick​

EventHandler<ActionCardListItemEventArgs> Occurs when a materialized card header is invoked.

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.