DropDownButtonItemClickEventArgs.ItemInfo Property
Returns information about the clicked drop-down list item.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
Declaration
public IDropDownButtonItemInfo ItemInfo { get; }
Property Value
Type | Description |
---|---|
IDropDownButtonItemInfo | An object that implements the IDropDownButtonItemInfo interface and stores information about the clicked drop-down list item. |
Remarks
Use the ItemInfo
event argument to obtain information about the clicked drop-down list item.
<div style="padding-bottom:20px;">
@if (ClickedItem != null) {
<span>Clicked item: <b>@ClickedItem</b></span>
} else {
<span>Clicked item: None</span>
}
</div>
<div style="width:300px; height:150px;">
<DxDropDownButton RenderStyle="ButtonRenderStyle.Secondary"
Text="Clipboard"
IconCssClass="tb-icon tb-icon-paste"
ItemClick=@OnClick
CssClass="me-1">
<Items>
<DxDropDownButtonItem Text="Cut" IconCssClass="menu-icon-cut menu-icon"/>
<DxDropDownButtonItem Text="Copy" IconCssClass="menu-icon-copy menu-icon" />
<DxDropDownButtonItem Text="Paste" IconCssClass="tb-icon tb-icon-paste" />
<DxDropDownButtonItem Text="Paste Special" BeginGroup="true">
<Items>
<DxDropDownButtonItem Text="Paste Text Only" />
<DxDropDownButtonItem Text="Paste Picture" Enabled="false" />
<DxDropDownButtonItem Text="Paste as Hyperlink" />
</Items>
</DxDropDownButtonItem>
</Items>
</DxDropDownButton>
</div>
@code {
string ClickedItem { get; set; } = "";
void OnClick(DropDownButtonItemClickEventArgs args) {
ClickedItem = args.ItemInfo.Text;
}
}
See Also