Skip to main content
You are viewing help content for a version that is no longer maintained/updated.
All docs
V17.2
  • CardWidget Class

    A Card widget that visualizes a Card dashboard item’s data.

    Namespace: DevExpress.Dashboard

    Assembly: DevExpress.Dashboard.v17.2.Web.Scripts.dll

    Declaration

    public class CardWidget

    Remarks

    You can access the CardWidget object when handling the ASPxClientDashboard.ItemWidget… events. To learn more, see Access to Underlying Widgets.

    Example

    The following code snippet shows how to customize specific texts displayed within the Card dashboard item using the CardWidget.onCustomizeText property. You can use this code when handling ASPxClientDashboard.ItemWidgetCreated / ASPxClientDashboard.ItemWidgetUpdated client-side events.

    function(s, e) { 
        if (e.ItemName == "cardDashboardItem1") {
            var card = e.GetWidget();
            card.onCustomizeText = function(args) {
                if (args.getValue() == "UK") {
                    return "United Kingdom";
                }
                if (args.getValue() == "USA") {
                    return "United States";
                }
            };
        }
    }
    

    Inheritance

    Object
    CardWidget
    See Also