I have the following tree list view:
<dxg:TreeListControl Name="treeList" Grid.Row="7" Height="230" Margin="10,2,10,0">
<dxg:TreeListControl.Columns>
<dxg:TreeListColumn FieldName="Description" />
<dxg:TreeListColumn FieldName="Package" />
<dxg:TreeListColumn FieldName="Procedure" />
</dxg:TreeListControl.Columns>
<dxg:TreeListControl.View>
<dxg:TreeListView Name="treeListView" KeyFieldName="Id" ParentFieldName="ParentId" />
</dxg:TreeListControl.View>
<dxmvvm:Interaction.Behaviors>
<dxg:TreeListDragDropManager x:Name="dragDropManager" AllowDrag="True" />
</dxmvvm:Interaction.Behaviors>
</dxg:TreeListControl>
My question is how to delete the selected rows from the tree list view. Thanks
Take a look at the How to: Manually Control Drag and Drop help-article that demonstrates how to customize Drag and Drop feature for the TreeList using Drag and Drop-related events.
The main idea of this article - if your TreeListControl is bound to the some collection:
you can use the TreeListDragDropManager.Drop event to change some items from this collection (e.g. remove items):
The complete sample project from the DevExpress Code Examples database.