The requested page is not available for the requested platform. You are viewing the content for Default platform.
All docs
V19.2
19.2
19.1
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

ASPxClientFloatingActionButton.GetAction(contextName) Method

Gets the action or action group by its context name.

Declaration

GetAction(contextName: string): ASPxClientFABAction

Parameters

Name Type Description
contextName string

An action's (action group's) context name.

Returns

Type Description
ASPxClientFABAction

An action (action group).

Remarks

Web Forms:


<dx:ASPxFloatingActionButton ID="ASPxFloatingActionButton1" runat="server" ClientInstanceName="fab" ContainerElementID="content">
    <ClientSideEvents Init="OnInit" ActionItemClick="OnActionItemClick" />
    <Items>
        <dx:FABActionGroup ContextName="ShareItemContext" Text="Share">
            <ExpandImage Url="../Content/FloatingActionButton/Images/Share.svg"></ExpandImage>
            <Items>
                ...
                <dx:FABActionItem ActionName="GooglePlus">
                    <Image Url="../Content/FloatingActionButton/Images/GooglePlus.svg"></Image>
                </dx:FABActionItem>
                <dx:FABActionItem ActionName="Facebook">
                    <Image Url="../Content/FloatingActionButton/Images/Facebook.svg"></Image>
                </dx:FABActionItem>
            </Items>
        </dx:FABActionGroup>
        ...
    </Items>
</dx:ASPxFloatingActionButton>

MVC:


@{
    var _fabActionItemCollection = new FABActionItemCollection();
    _fabActionItemCollection.Add(new FABActionItem("Down", "icon1.png"));
    _fabActionItemCollection.Add(new FABActionItem("Up", "icon2.png"));
}
@Html.DevExpress().FloatingActionButton(floatingActionButtonSettings => {
    floatingActionButtonSettings.Name = "fab";
    floatingActionButtonSettings.ContainerElementID = "Grid";
    floatingActionButtonSettings.Items.Add(new FABAction("Action1", "Action1"));
    floatingActionButtonSettings.Items.Add(new FABActionGroup("Action2", _fabActionItemCollection));
    floatingActionButtonSettings.ClientSideEvents.ActionItemClick = "onItemClick";
...
}).GetHtml()

Concept

Floating Action Button

See Also