Skip to content

Datagrid Row Context Menu Support #38

@duke-darius

Description

@duke-darius

Feature Type
[ ] Clarity Port
[X ] Enhancement

Datagrid:
It would be so handy if we could use Blazority to attach a context menu that is generated based on the current row clicked on.
I investigated using the RowClicked event handler but this doesn't seem to register on right clicks.

Something like the below code would be a good way to mock up the Context Menu item:

<Datagrid TRowData="BlueprintDocument" Items="documents" RowClicked="(u) => DocumentClicked.InvokeAsync(u)" RowClass="DynamicRowClass" >

	<DatagridContextMenu Context="selectedItem">
		<Item OnClick="@OnClick(selectedItem)">Item 1</Item>
		<Item OnClick="@OnClick(selectedItem)">Item 2</Item>
		<Item OnClick="@OnClick(selectedItem)" Enabled="false">Item 3 (disabled)</Item>
		<Seperator />
		<Item>Submenu
			<SubMenu>
				<Item OnClick="@OnClick(selectedItem)">Submenu Item 1</Item>
				<Item OnClick="@OnClick(selectedItem)">Submenu Item 2</Item>
			</SubMenu>
		</Item>
	</DatagridContextMenu>
        ...

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions